|
@ -52,10 +52,15 @@ chmod +x /home/$USER/crond/playground.config.js |
|
|
read -r -d '' VAR <<EOF |
|
|
read -r -d '' VAR <<EOF |
|
|
#!/bin/bash |
|
|
#!/bin/bash |
|
|
|
|
|
|
|
|
cd /home/$USER/project/tutor/$REPO |
|
|
if [ ! -d "$REPO" ] ; then |
|
|
git fetch origin master |
|
|
cd /home/$USER |
|
|
git reset --hard FETCH_HEAD |
|
|
git clone $GIT_TUTOR |
|
|
git clean -df |
|
|
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 |
|
|
echo "$VAR" > /home/$USER/crond/playground-sync.sh |
|
|
chmod +x /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 |
|
|
# ELSE |
|
|