chore: clean up #2

Open
williamluke wants to merge 18 commits from lum/kitabu into master
2 changed files with 41 additions and 0 deletions
Showing only changes of commit 6383cce853 - Show all commits

32
install.sh Normal file
View File

@ -0,0 +1,32 @@
# 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'
print_usage() {
printf "CIC Staff Installer
Options:
-b <branch> Name of the branch you want use to install
-v Verbose
-h Print this help message
"
}
while getopts 'hb:v' flag; do
case "${flag}" in
b) branch="${OPTARG}" ;;
v) verbose='true' ;;
h) print_usage
exit 0 ;;
*) print_usage
exit 1 ;;
esac
done
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

9
rsync-install-script.sh Normal file
View File

@ -0,0 +1,9 @@
host='root.grassrootseconomics.net'
file_to_sync='./install.sh'
distination_dir='/usr/local/share/python/packages'
distination_file_name='cic-staff-installer.sh'
user='root'
echo Syncing $file_to_sync to $distination_dir as $user on $host
rsync -avz --progress $file_to_sync $user@$host:$distination_dir/$distination_file_name