From 95558022f680867bbfe0f33c84fd3379b7ea2ee4 Mon Sep 17 00:00:00 2001 From: GeLo Date: Thu, 4 Feb 2016 12:50:35 +0100 Subject: [PATCH 1/2] Add work-dir option support --- git-subsplit.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/git-subsplit.sh b/git-subsplit.sh index 5c84c3b..85ef803 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" ;; From 680e03d607e31914d6c857088670da5df5462484 Mon Sep 17 00:00:00 2001 From: GeLo Date: Thu, 4 Feb 2016 16:15:59 +0100 Subject: [PATCH 2/2] Allow to use the script standalone --- git-subsplit.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/git-subsplit.sh b/git-subsplit.sh index 85ef803..8f1ce44 100755 --- a/git-subsplit.sh +++ b/git-subsplit.sh @@ -345,4 +345,9 @@ subsplit_update() popd >/dev/null } +if [ "$(basename -- "$0")" == "git-subsplit.sh" ]; +then + shift +fi + subsplit_main "$@"