Last active
March 7, 2018 19:06
-
-
Save azbones/811140b5dbfbafb66b2adc6aec8fecda to your computer and use it in GitHub Desktop.
jupyterhub scripts for cis 503
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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