-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupd_gh_pages.sh
executable file
·23 lines (21 loc) · 973 Bytes
/
upd_gh_pages.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
git checkout gh-pages \
&& git rm -f index.html \
&& git checkout master client/index.html \
&& git mv client/index.html index.html \
&& git checkout master client/styles/main.min.css \
&& sed -i'' -e 's/<link href=\"styles\/main.min.css\" media=\"all\" type=\"text\/css\" rel=\"stylesheet\" \/>//' index.html \
&& sed -i'' -e 's/<\/title>/<\/title><style>/' index.html \
&& sed -i'' '/<style>/ r client/styles/main.min.css' index.html \
&& sed -i'' -e 's/<\/head>/<\/style><\/head>/' index.html \
&& sed -i'' -e 's/url(\.\.\/images\//url(\.\/images\//g' index.html \
&& sed -i'' -e 's/url(\/fonts\//url(\.\/fonts\//g' index.html \
&& rm -f client/styles/main.min.css \
&& rm -f scripts/main.min.js \
&& git checkout master client/scripts/main.min.js \
&& mv client/scripts/main.min.js scripts/main.min.js \
&& git add scripts/main.min.js index.html \
&& git commit -a -S -m "Releasing project" \
&& git push origin gh-pages \
&& git checkout master
exit 0