summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/main.sh b/main.sh
index a23a989..0c3d3df 100644
--- a/main.sh
+++ b/main.sh
@@ -19,12 +19,18 @@ function main
if [ ! -f ".systr/BASE" ]; then
if [[ "$cmd" == "checkout" ]]; then
systr_checkout "$@"
- exit
+ elif [[ "$cmd" == "init" ]]; then
+ systr_init "$@"
+ else
+ echo "Fatal: not in a worktree" >&2
+ exit 1
fi
+
+ exit
fi
- read path <.systr/path || echo "Fatal: not in a worktree" >&2
- read BASE <.systr/BASE || exit 1
+ read path <.systr/path
+ read BASE <.systr/BASE
read TRAC <.systr/TRAC
read MERG <.systr/MERG
read updated <.systr/updated