2022-01-26 09:16:41 +01:00
|
|
|
# Example Usage
|
2022-02-14 14:31:24 +01:00
|
|
|
# bash <(curl -s https://git.grassecon.net/grassrootseconomics/cic-staff-installer/raw/branch/lum/kitabu/install.sh) -h
|
2022-01-26 09:16:41 +01:00
|
|
|
# This is currently living on at pip because root is using a self signed cert
|
2022-02-14 14:31:24 +01:00
|
|
|
# When changes are made to this file you must run bash ./rsync/rsync-install-script.sh to sync it to the server
|
2022-01-26 09:16:41 +01:00
|
|
|
|
|
|
|
branch='master'
|
|
|
|
verbose='false'
|
2022-01-27 10:25:17 +01:00
|
|
|
evm= # kitabu | bloxberg
|
2022-01-26 09:16:41 +01:00
|
|
|
|
|
|
|
print_usage() {
|
|
|
|
printf "CIC Staff Installer
|
|
|
|
Options:
|
|
|
|
-b <branch> Name of the branch you want use to install
|
2022-02-14 14:31:24 +01:00
|
|
|
-e <evm> Name of the EVM you want to install (kitabu, bloxberg; default is none)
|
2022-01-26 09:16:41 +01:00
|
|
|
-v Verbose
|
|
|
|
-h Print this help message
|
|
|
|
"
|
|
|
|
}
|
|
|
|
|
2022-01-27 10:25:17 +01:00
|
|
|
while getopts 'e:hb:v' flag; do
|
2022-01-26 09:16:41 +01:00
|
|
|
case "${flag}" in
|
|
|
|
b) branch="${OPTARG}" ;;
|
2022-01-27 10:25:17 +01:00
|
|
|
e) evm="${OPTARG}" ;;
|
2022-01-26 09:16:41 +01:00
|
|
|
v) verbose='true' ;;
|
|
|
|
h) print_usage
|
|
|
|
exit 0 ;;
|
|
|
|
*) print_usage
|
|
|
|
exit 1 ;;
|
|
|
|
esac
|
|
|
|
done
|
2022-01-27 10:25:17 +01:00
|
|
|
export INSTALL_EVM=${evm}
|
2022-02-14 14:31:24 +01:00
|
|
|
if [ ! -z $INSTALL_EVM ]; then
|
|
|
|
. setup_evm.sh
|
|
|
|
fi
|
2022-01-26 09:16:41 +01:00
|
|
|
temp_dir=`mktemp -d`
|
|
|
|
git clone -b $branch https://git.grassecon.net/grassrootseconomics/cic-staff-installer.git $temp_dir
|
2022-02-14 16:00:34 +01:00
|
|
|
if [ ! -z $verbose ]; then
|
|
|
|
export BASH_DEBUG_LEVEL=${BASH_DEBUG_LEVEL:-1} # all=1 trace=2 debug=3 info=4 warn=5 error=6
|
|
|
|
else
|
|
|
|
export BASH_DEBUG_LEVEL=${BASH_DEBUG_LEVEL:-4} # all=1 trace=2 debug=3 info=4 warn=5 error=6
|
|
|
|
fi
|
2022-02-14 14:31:24 +01:00
|
|
|
export BASH_DEBUG=1
|
2022-02-14 16:00:34 +01:00
|
|
|
# export CIC_ROOT_CA_FILE=$temp_dir/keys/ge.ca
|
|
|
|
pushd $temp_dir
|
|
|
|
bash setup.sh
|
|
|
|
popd
|