moved scripts to bin/, added gulp tasks

This commit is contained in:
Bachir Soussi Chiadmi
2017-03-26 12:39:37 +02:00
parent 55c06ee81a
commit b68f53c0b0
7 changed files with 51 additions and 4 deletions
Executable
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
echo "Sync books"
# activate credential cache
git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=7200'
folder='book-src'
host='https://figureslibres.io/gogs/bachir'
# echo "$host"
repos[0]='TDSM-oeuvres'
repos[1]='TDSM-notices'
repos[2]='TDSM-commissaires'
repos[3]='TDSM-english'
# echo $repos
for repo in "${repos[@]}"
do
echo ${repo}
if [ -d $folder/$repo.git ];
then
# if repos exists, pull
echo "Pull $repo"
git -C $folder/$repo.git pull origin master
else
# if repos does not exists, clone
echo "clone $repo"
git clone $host/$repo.git $folder/$repo.git
fi
done