-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathtoGit.sh
executable file
·48 lines (45 loc) · 840 Bytes
/
toGit.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
37
38
39
40
41
42
43
44
45
46
47
48
#// TO LOCAL
#sed -i '' 's/https:\/\/wdg.github.io\/tvOS.js\//http:\/\/localhost:9001\//g' *.js
if [ -z "$1" ]; then
message="tvOS.js Auto Update"
else
message="$1"
fi
# Push wiki
cd tvOS.js.wiki
git pull
git fetch
php generateDocs.php
sed -i '' 's/http:\/\/localhost:9001\//https:\/\/wdg.github.io\/tvOS.js\//g' *.md
git add .
git commit -m "$message"
git push
cd ..
# Push wiki data
cd tvOS.wiki-data
git pull
git fetch
git add .
git commit -m "$message"
git push
cd ..
# Push www
rm tvOS.www/*.js
rm tvOS.www/*.html
cp Server/*.js tvOS.www/
cp Server/*.html tvOS.www/
cd tvOS.www
#To Publish, rewrite url!
sed -i '' 's/http:\/\/localhost:9001\//https:\/\/wdg.github.io\/tvOS.js\//g' *.js
git pull
git fetch
git add .
git commit -m "$message"
git push
cd ..
# Push main
git pull
git fetch
git add .
git commit -m "$message"
git push