-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeploy.sh
executable file
·20 lines (13 loc) · 1.07 KB
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
tar cvzf fractal_retro.tar.gz html/
scp fractal_retro.tar.gz [email protected]:
rm fractal_retro.tar.gz
if ! [ -z $1 ]; then
if [ $1 = "uca" ]; then
ssh [email protected] "scp fractal_retro.tar.gz condigital@cognac:www/fractal_retro_uca && ssh condigital@cognac 'cd www/fractal_retro_uca && rm index.html && rm -rf jars/ && tar -xvzf fractal_retro.tar.gz && rm fractal_retro.tar.gz && mv -f html/* . && rm -rf html/'"
fi
if [ $1 = "edu" ]; then
ssh [email protected] "scp fractal_retro.tar.gz root@educacional:/home/apps/dev/educacional.c3sl.ufpr.br/public/ && ssh root@educacional 'cd /home/apps/dev/educacional.c3sl.ufpr.br/public/fractal && rm -rf * && mv ../fractal_retro.tar.gz . && tar -xvzf fractal_retro.tar.gz && rm fractal_retro.tar.gz && mv -f html/* . && rm -rf html/'"
fi
else
ssh [email protected] "scp fractal_retro.tar.gz condigital@cognac:www/fractal_retro && ssh condigital@cognac 'cd www/fractal_retro && rm index.html && rm -rf jars/ && tar -xvzf fractal_retro.tar.gz && rm fractal_retro.tar.gz && mv -f html/* . && rm -rf html/'"
fi