forked from chaibio/chaipcr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
assets-deploy.sh
executable file
·26 lines (22 loc) · 1023 Bytes
/
assets-deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
if [ -z $(which sshpass) ]
then
echo installing sshpass
sudo apt-get install -y sshpass
fi
if [ ! -n "$remote_password" ]
then
echo "Enter remote password: "
read remote_password
if [ -z $remote_password ]
then
echo "Password can't be empty!"
exit
fi
fi
rm -rf ./web/log
rsync --delete --rsh="sshpass -p $remote_password ssh -oStrictHostKeyChecking=no -l root" -a ./web/public/javascripts "$1:/root/chaipcr/web/public"
rsync --delete --rsh="sshpass -p $remote_password ssh -oStrictHostKeyChecking=no -l root" -a ./web/public/stylesheets "$1:/root/chaipcr/web/public"
rsync --delete --rsh="sshpass -p $remote_password ssh -oStrictHostKeyChecking=no -l root" -a ./web/public/fonts "$1:/root/chaipcr/web/public"
rsync --delete --rsh="sshpass -p $remote_password ssh -oStrictHostKeyChecking=no -l root" -a ./web/public/images "$1:/root/chaipcr/web/public"
rsync --delete --rsh="sshpass -p $remote_password ssh -oStrictHostKeyChecking=no -l root" -a ./web/app/views "$1:/root/chaipcr/web/app"