2022-01-26 09:16:41 +01:00
|
|
|
# Example Usage
|
|
|
|
# bash <(curl -s https://pip.grassrootseconomics.net/cic-staff-installer.sh) -h
|
|
|
|
# This is currently living on at pip because root is using a self signed cert
|
|
|
|
# When changes are made to this file you must run bash ./rsync-install-script.sh to sync it to the server
|
|
|
|
|
|
|
|
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-01-27 10:25:17 +01:00
|
|
|
-e <evm> Name of the EVM you want to install (kitabu, bloxberg)
|
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-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
|
|
|
|
cd $temp_dir
|
|
|
|
bash setup.sh
|