aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-07-02 00:27:30 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-07-02 00:27:30 +1200
commitb2b4447428f9ad2662eb4c98e86a8216cf2fd67a (patch)
tree4e5bde3aea97aecbf8533bd5eb0171f6d5f7f977 /bin
parentUse set rather than building arg arrays (diff)
downloaddotfiles-b2b4447428f9ad2662eb4c98e86a8216cf2fd67a.tar.gz
dotfiles-b2b4447428f9ad2662eb4c98e86a8216cf2fd67a.zip
Exit from gscr(1) subshell, not continue
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gscr10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/gscr b/bin/gscr
index e09469fd..4f7e469c 100755
--- a/bin/gscr
+++ b/bin/gscr
@@ -3,13 +3,13 @@
for arg in "${@:-.}" ; do (
case $arg in
*.git)
- cd -- "$arg" || continue
+ cd -- "$arg" || exit
;;
*)
- cd -- "$arg"/.git || continue
+ cd -- "$arg"/.git || exit
;;
esac
- git fsck || continue
- git reflog expire --expire=now || continue
- git gc --prune=now --aggressive || continue
+ git fsck || exit
+ git reflog expire --expire=now || exit
+ git gc --prune=now --aggressive || exit
) done