zoukankan      html  css  js  c++  java
  • 一个我用来上传代码到Github的 Shell 脚本

    因为用git老是要敲许多命令。所以写了个小脚本。代码如下:

     1  #! /bin/sh
     2   echo Going to simpleWebtest...
     3   cd ~/softwaredevelopment/workspace/simpleWebtest
     4   echo check git status...
     5   git status
     6   
     7   echo "commit?(yes/no)"
     8   read choice
     9   
    10   if [ ${choice} = yes ]
    11   then echo Please Enter the commit message:
    12    else echo Not commited.
    13       exit
    14    fi
    15   
    16   read message
    17   #echo message is $message
    18  
    19   git add .
    20   git commit -m"$message"
    21   echo committed
    22   echo "push to git?(yes/no)"
    23   read push_choice
    24  
    25   if [ ${push_choice} = yes ]
    26   then echo trying to push to origin master...
    27   git push origin master
    28   else echo Not pushed.
    29   fi
  • 相关阅读:
    html例题——简历
    求值
    c#语句实例(排大小)
    3.6语言基础笔记
    2016.3.5进制间的转换
    3.26-1
    3.23(网页)
    3.23
    3.22
    3.20
  • 原文地址:https://www.cnblogs.com/sdet/p/3650058.html
Copyright © 2011-2022 走看看