diff --git a/git-subsplit.sh b/git-subsplit.sh index 5c84c3b..8f1ce44 100755 --- a/git-subsplit.sh +++ b/git-subsplit.sh @@ -71,6 +71,7 @@ subsplit_main() --update) UPDATE=1 ;; -n) DRY_RUN="--dry-run" ;; --dry-run) DRY_RUN="--dry-run" ;; + --work-dir) WORK_DIR="$1"; shift ;; --rebuild-tags) REBUILD_TAGS=1 ;; --) break ;; *) die "Unexpected option: $opt" ;; @@ -344,4 +345,9 @@ subsplit_update() popd >/dev/null } +if [ "$(basename -- "$0")" == "git-subsplit.sh" ]; +then + shift +fi + subsplit_main "$@"