diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-23 16:18:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-23 16:18:51 +0300 |
commit | c1047c1ea1a6c8008159836182eb65a52f7a1fd3 (patch) | |
tree | b3572c681591111f1ad6fec85cf9256d115acffc /status.sh | |
parent | d91e921c0bc72b23d17a3581a420295ffc856b4c (diff) | |
download | evol-all-c1047c1ea1a6c8008159836182eb65a52f7a1fd3.tar.gz evol-all-c1047c1ea1a6c8008159836182eb65a52f7a1fd3.tar.bz2 evol-all-c1047c1ea1a6c8008159836182eb65a52f7a1fd3.tar.xz evol-all-c1047c1ea1a6c8008159836182eb65a52f7a1fd3.zip |
Fix style in shell scripts.
Diffstat (limited to 'status.sh')
-rwxr-xr-x | status.sh | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -4,13 +4,13 @@ function status { if [ ! -d "$1" ]; then return fi - DIR=`pwd` + DIR=$(pwd) cd "$1" - STR=`git diff --stat --color=always` - STR2=`git status|grep -E "Your branch is (behind|ahead)"` - STR3=`git status -s -uno` + STR=$(git diff --stat --color=always) + STR2=$(git status|grep -E "Your branch is (behind|ahead)") + STR3=$(git status -s -uno) if [[ "${CMD}" == "commit" || "${CMD}" == "c" ]]; then - COMMIT=`git rev-parse HEAD` + COMMIT=$(git rev-parse HEAD) echo -e "$2: \e[1;33m${COMMIT}\e[0m" fi if [[ -n "${STR}${STR2}${STR3}" ]]; then @@ -26,7 +26,7 @@ function status { echo -e "\e[1;33m${STR3}\e[0m" fi fi - cd $DIR + cd "$DIR" } CMD="$1" |