Skip to content

Instantly share code, notes, and snippets.

@azbones
Last active March 7, 2018 19:06
Show Gist options
  • Save azbones/811140b5dbfbafb66b2adc6aec8fecda to your computer and use it in GitHub Desktop.
Save azbones/811140b5dbfbafb66b2adc6aec8fecda to your computer and use it in GitHub Desktop.
jupyterhub scripts for cis 503
#!/bin/bash
declare -a array=("data-science" "machine-learning")
for i in $(ls -d /home/*)
do
ls $i | egrep "^data-science"
if [ $? -eq 0 ]; then
echo "repos already exist updating repos"
for repo in "${array[@]}"
do
echo "trying pull for repo $repo in $i"
cd $i/$repo
git stash
git pull
done
else
echo "creating new repos in $i"
git clone https://github.com/azbones/cis503_data_science_tools.git /home/"${i##*/}"/data-science
git clone https://github.com/azbones/cis503_machine_learning.git /home/"${i##*/}"/machine-learning
echo $PWD
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment