-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrogue-variables.sh
executable file
·43 lines (35 loc) · 1.18 KB
/
rogue-variables.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# define rogue variables here.
GEONODE_VIRTUALENV_PATH=/var/lib/geonode
GEONODE_ROGUE_REPO_PATH=$GEONODE_VIRTUALENV_PATH/rogue_geonode
GEONODE_REPO_PATH=$GEONODE_VIRTUALENV_PATH/geonode
# variabled used to signal exit
ROGUE_ABORT=false;
# This will cause the shell to exit immediately if a simple
# command exits with a nonzero exit value.
#set -e
echo ""
echo "=================================================="
echo "GEONODE_VIRTUALENV_PATH = $GEONODE_VIRTUALENV_PATH"
echo "GEONODE_ROGUE_REPO_PATH = $GEONODE_ROGUE_REPO_PATH"
echo "GEONODE_REPO_PATH = $GEONODE_REPO_PATH"
echo "=================================================="
echo ""
function prompt_to_verify_paths() {
while true; do
read -p "Are the above paths correct? " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) echo "Aborting script";return 1;;
* ) echo "Please answer yes or no. ";;
esac
done
}
function is_defined() {
# if these variables are empty or have been set to empty, abort the script
if [ -z "$1" ]; then
echo "** Error ** a required variable is not set. Aborting script!";
return 2;
fi
}
echo "-- rogue-variables.sh loaded"