summaryrefslogtreecommitdiff
path: root/status.sh
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-23 16:18:51 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-23 16:18:51 +0300
commitc1047c1ea1a6c8008159836182eb65a52f7a1fd3 (patch)
treeb3572c681591111f1ad6fec85cf9256d115acffc /status.sh
parentd91e921c0bc72b23d17a3581a420295ffc856b4c (diff)
downloadevol-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-xstatus.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/status.sh b/status.sh
index 1aa3e26..e0be46a 100755
--- a/status.sh
+++ b/status.sh
@@ -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"