summaryrefslogtreecommitdiff
path: root/git-update-agent
diff options
context:
space:
mode:
authorflu0r1ne <flu0r1ne@flu0r1ne.net>2021-08-22 03:15:17 -0500
committerflu0r1ne <flu0r1ne@flu0r1ne.net>2021-08-22 03:15:17 -0500
commit79e62092cf73e43248127239bd759f1c52d99b45 (patch)
tree185795a50c9572cb66246abe5a51f04921e828ca /git-update-agent
parenta041727d53e89022b29121c6290f89c23ab6c298 (diff)
downloaddeb-git-update-agent-79e62092cf73e43248127239bd759f1c52d99b45.tar.xz
deb-git-update-agent-79e62092cf73e43248127239bd759f1c52d99b45.zip
Organization
Diffstat (limited to 'git-update-agent')
-rw-r--r--git-update-agent39
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