summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2018-06-16 17:29:07 -0700
committerBen Sima <ben@bsima.me>2018-06-16 17:30:08 -0700
commit3cffc4b00b6650894c8f96b7d0c1c9ee487317cf (patch)
tree84953f481efcb65d5aabec73337a05985f9dd779
parentc718c4233f3fd2159670eae05564d2637d0a63ad (diff)
Fixes
-rwxr-xr-xgsdir9
-rwxr-xr-xme6
2 files changed, 8 insertions, 7 deletions
diff --git a/gsdir b/gsdir
index 6be6aae..9f92a8d 100755
--- a/gsdir
+++ b/gsdir
@@ -2,12 +2,13 @@
cur=$PWD
-for d in */
+for d in *
do
- cd "${d}"
+ cd "$d" || return
status=$(unbuffer git status -sb | tr -d '#')
- printf "%-20s:: %s\n" "${d}" "${status}"
+ printf "%-30s:: %s\\n" "${d}" "${status}"
+ cd "${cur}" || return
done
-cd "${cur}"
+cd "${cur}" || exit 1
exit 0
diff --git a/me b/me
index d944ba2..d0bc972 100755
--- a/me
+++ b/me
@@ -12,13 +12,13 @@ function usage {
function allStatuses {
for d in ~/.password-store ~/bin ~/config ~/org ~/web ~/me
do
- cd "${d}"
+ cd "${d}" || exit 1
dirname=${d/\/home\/ben/\~}
status=$(unbuffer git status -sb | tr -d '#')
- printf "%-20s:: %s\n" "${dirname}" "${status}"
+ printf "%-20s:: %s\\n" "${dirname}" "${status}"
done
- cd "${cur}"
+ cd "${cur}" || exit 1
exit 0
}