diff options
-rw-r--r-- | main.sh | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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 |