|
|
@ -52,10 +52,15 @@ chmod +x /home/$USER/crond/playground.config.js |
|
|
|
read -r -d '' VAR <<EOF |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
cd /home/$USER/project/tutor/$REPO |
|
|
|
git fetch origin master |
|
|
|
git reset --hard FETCH_HEAD |
|
|
|
git clean -df |
|
|
|
if [ ! -d "$REPO" ] ; then |
|
|
|
cd /home/$USER |
|
|
|
git clone $GIT_TUTOR |
|
|
|
else |
|
|
|
cd /home/$USER/$REPO |
|
|
|
git fetch origin master |
|
|
|
git reset --hard FETCH_HEAD |
|
|
|
git clean -df |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -63,6 +68,22 @@ EOF |
|
|
|
echo "$VAR" > /home/$USER/crond/playground-sync.sh |
|
|
|
chmod +x /home/$USER/crond/playground-sync.sh |
|
|
|
|
|
|
|
|
|
|
|
# --------------------------- |
|
|
|
# install npm |
|
|
|
# -------------------------- |
|
|
|
read -r -d '' VAR <<EOF |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
cd /home/$USER/$REPO/swarmlab-app/src |
|
|
|
npm install; |
|
|
|
npm cache clean --force; |
|
|
|
|
|
|
|
EOF |
|
|
|
echo "$VAR" > /home/$USER/crond/playground-sync.sh |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ***************************************************** |
|
|
|
# ***************************************************** |
|
|
|
# ELSE |
|
|
|