]> git.armaanb.net Git - bin.git/commitdiff
kiss-git: new script
authorArmaan Bhojwani <me@armaanb.net>
Thu, 15 Jul 2021 18:20:59 +0000 (14:20 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Thu, 15 Jul 2021 18:20:59 +0000 (14:20 -0400)
kiss-git [new file with mode: 0755]

diff --git a/kiss-git b/kiss-git
new file mode 100755 (executable)
index 0000000..25c62f3
--- /dev/null
+++ b/kiss-git
@@ -0,0 +1,13 @@
+#!/usr/bin/sh -e
+
+gitcmd() {
+       version=$(cut -d ' ' -f 1 $2/version)
+       pkg=$(printf %s "$2" | sed 's|/||g')
+       git add $2
+}
+
+case $1 in
+       new) gitcmd $@ && git commit -m "$pkg: new package at $version" ;;
+       bump) gitcmd $@ && git commit -m "$pkg: bump to $version" ;;
+       *) printf "No such subcommand.\n"; exit 1 ;;
+esac