diff options
author | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2021-08-22 03:15:17 -0500 |
---|---|---|
committer | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2021-08-22 03:15:17 -0500 |
commit | 79e62092cf73e43248127239bd759f1c52d99b45 (patch) | |
tree | 185795a50c9572cb66246abe5a51f04921e828ca | |
parent | a041727d53e89022b29121c6290f89c23ab6c298 (diff) | |
download | git-update-agent-79e62092cf73e43248127239bd759f1c52d99b45.tar.xz git-update-agent-79e62092cf73e43248127239bd759f1c52d99b45.zip |
Organization
-rw-r--r-- | git-update-agent | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/git-update-agent b/git-update-agent index ec3916e..6c205a7 100644 --- a/git-update-agent +++ b/git-update-agent @@ -190,6 +190,21 @@ $PROGRAM --track _EOF } +print_usage() { +cat <<_EOF +Usage: ${PROGRAM} [OPTIONS]... + -h, --help output this help info + -d, --dir update in directory + --init initialize a project with the given URL + --track track a git repository not initialized with $PROGRAM + --disable-tracking disable tracking +_EOF +} + +# +# SUBCOMMANDS +# + set_tracking() { local dir dir="$1" @@ -208,16 +223,6 @@ _EOF set_should_track "$2" } -disable_tracking() { - local dir - dir="$1" - - cd_or_die "$dir" - in_git_or_die - - set_should_track false -} - update() { local dir local previous_version @@ -261,16 +266,6 @@ update() { fi } -print_usage() { -cat <<_EOF -Usage: ${PROGRAM} [OPTIONS]... - -h, --help output this help info - -d, --dir update in directory - --init initialize a project with the given URL - --track track a git repository not initalized with $PROGRAM - --disable-tracking disable tracking -_EOF -} init_repo() { local remote @@ -313,6 +308,10 @@ init_repo() { set +e } +# +# API +# + git_update_agent() { local dir local option |