Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wolf_scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_scripts
Commits
b0353721
Commit
b0353721
authored
3 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
checking for valid paths
parent
42e2dc12
No related branches found
No related tags found
No related merge requests found
Pipeline
#8655
failed
3 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
install_wolf.sh
+26
-6
26 additions, 6 deletions
install_wolf.sh
with
26 additions
and
6 deletions
install_wolf.sh
+
26
−
6
View file @
b0353721
...
@@ -35,6 +35,11 @@ func_check_yn () {
...
@@ -35,6 +35,11 @@ func_check_yn () {
fi
fi
}
}
# START #####################################################
CORES
=
$(
nproc
)
func_echo
"The number of available cores on this machine is
$CORES
"
RUN_PATH
=
$PWD
## OPTIONS #####################################################
## OPTIONS #####################################################
VERBOSE
=
"true"
VERBOSE
=
"true"
INSTALL_PLUGINS
=
""
INSTALL_PLUGINS
=
""
...
@@ -103,9 +108,21 @@ while getopts "vap:d:w:hf:c:" opt; do
...
@@ -103,9 +108,21 @@ while getopts "vap:d:w:hf:c:" opt; do
;;
;;
d
)
# deps path
d
)
# deps path
DEPS_PATH
=
$OPTARG
DEPS_PATH
=
$OPTARG
if
cd
$DEPS_PATH
;
then
func_echo
"Valid dependency path."
else
echo
"Invalid dependency path."
exit
1
fi
;;
;;
w
)
# wolf path
w
)
# wolf path
WOLF_PATH
=
$OPTARG
WOLF_PATH
=
$OPTARG
if
cd
$WOLF_PATH
;
then
func_echo
"Valid wolf folder path."
else
echo
"Invalid wolf folder path."
exit
1
fi
;;
;;
h
)
h
)
usage
usage
...
@@ -123,10 +140,6 @@ while getopts "vap:d:w:hf:c:" opt; do
...
@@ -123,10 +140,6 @@ while getopts "vap:d:w:hf:c:" opt; do
esac
esac
done
done
# START #####################################################
CORES
=
$(
nproc
)
func_echo
"The number of available cores on this machine is
$CORES
"
RUN_PATH
=
$PWD
# UBUNTU
# UBUNTU
if
[
"
$UID
"
-eq
0
-o
"
$EUID
"
-eq
0
]
;
then
if
[
"
$UID
"
-eq
0
-o
"
$EUID
"
-eq
0
]
;
then
...
@@ -148,12 +161,16 @@ fi
...
@@ -148,12 +161,16 @@ fi
# WOLF DEPENDENCIES #####################################################
# WOLF DEPENDENCIES #####################################################
cd
$RUN_PATH
func_echo
"You are in folder
$PWD
"
func_echo
"You are in folder
$PWD
"
if
[
$DEPS_PATH
==
"undefined"
]
;
then
if
[
$DEPS_PATH
==
"undefined"
]
;
then
echo
"Enter path for dependencies (either /global/path or relative/path):"
echo
"Enter path for dependencies (either /global/path or relative/path):"
read
DEPS_PATH
read
DEPS_PATH
fi
fi
cd
$DEPS_PATH
while
!
cd
$DEPS_PATH
;
do
echo
"Invalid dependency path. Enter path for dependencies (either /global/path or relative/path):"
read
DEPS_PATH
done
DEPS_PATH
=
$PWD
DEPS_PATH
=
$PWD
func_echo
"path dependencies:
$DEPS_PATH
"
func_echo
"path dependencies:
$DEPS_PATH
"
...
@@ -227,7 +244,10 @@ if [ $WOLF_PATH == "undefined" ]; then
...
@@ -227,7 +244,10 @@ if [ $WOLF_PATH == "undefined" ]; then
echo
"Enter path for wolf folder (either /global/path or relative/path):"
echo
"Enter path for wolf folder (either /global/path or relative/path):"
read
WOLF_PATH
read
WOLF_PATH
fi
fi
cd
$WOLF_PATH
while
!
cd
$WOLF_PATH
;
do
echo
"Invalid dependency path. Enter path for dependencies (either /global/path or relative/path):"
read
WOLF_PATH
done
mkdir
wolf
mkdir
wolf
cd
wolf
cd
wolf
WOLF_PATH
=
$PWD
WOLF_PATH
=
$PWD
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment