willin преди 7 години
родител
ревизия
dbac0e6da4
променени са 1 файла, в които са добавени 14 реда и са изтрити 43 реда
  1. 14 43
      cmd

+ 14 - 43
cmd

@@ -1,46 +1,17 @@
 #!/bin/bash
 
-pushd $(dirname "${0}") > /dev/null
-DIR=$(pwd -L)
-popd > /dev/null
+git add .
+git commit -m 'Gitbook Auto Published'
+git push origin master
+git push coding master
 
-ACTION=$1
-
-build() {
-  git add .
-  git commit -m 'Gitbook Auto Published'
-  git push origin master
-  git push coding master
-
-  node_modules/.bin/gitbook build
-  cd $DIR/_book && git add .
-  cd $DIR/_book && git commit -m "Gitbook Auto Deployed"
-  cd $DIR/_book && git push -f coding master:coding-pages
-  cd $DIR/_book && git push -f origin master:gh-pages
-}
-
-clean() {
-  git add .
-  git commit -m 'Gitbook Auto Published'
-  git push origin master
-  git push coding master
-
-  rm -rf _book
-  node_modules/.bin/gitbook build
-  cd $DIR/_book && git init
-  cd $DIR/_book && git add .
-  cd $DIR/_book && git commit -m "Gitbook Auto Deployed"
-  cd $DIR/_book && git remote add origin git@github.com:js-cool/leader.js.cool.git
-  cd $DIR/_book && git remote add coding git@git.coding.net:willin/leader.js.cool.git
-  cd $DIR/_book && git push -f coding master:coding-pages
-  cd $DIR/_book && git push -f origin master:gh-pages
-}
-
-case "$ACTION" in
-  clean)
-    clean
-  ;;
-  *)
-    build
-  ;;
-esac
+rm -rf _book
+node_modules/.bin/gitbook build
+cd _book
+git init
+git add .
+git commit -m "Gitbook Auto Deployed"
+git remote add origin git@github.com:js-cool/leader.js.cool.git
+git remote add coding git@git.coding.net:willin/leader.js.cool.git
+git push -f coding master:coding-pages
+git push -f origin master:gh-pages