forked from 0xfe/vexflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpush.sh
executable file
·36 lines (28 loc) · 936 Bytes
/
push.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
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Simple deployment script for vexflow.com.
#
# Pushes only JavaScript, tests, and supporting HTML (tutorial, playground)
TARGET='/home/mohit/www/vexflow'
SSH_TO="[email protected] source ~/.bash_profile; cd $TARGET;"
SCP_TO="[email protected]:$TARGET"
echo Building...
grunt clean; grunt
ssh $SSH_TO "mkdir -p $TARGET; mkdir -p $TARGET/support"
if [ "$?" != "0" ]
then
echo "Cannot create remote directory."
exit 1
fi
echo Copying over compiled sources...
scp releases/vexflow-min.js $SCP_TO/support
scp releases/vexflow-debug.js $SCP_TO/support
scp releases/vexflow-min.js.map $SCP_TO/support
scp -r releases/vexflow-min.js.map $SCP_TO
echo Copying over tests...
rsync -przvl --delete --stats tests $SCP_TO
scp tests/flow.html $SCP_TO/tests/index.html
echo Copy over docs...
rsync -przvl --delete --stats releases/docs $SCP_TO
scp -r docs/index.html $SCP_TO
ssh $SSH_TO "rm docs/index.html"
echo Done.