From: Armaan Bhojwani Date: Thu, 15 Jul 2021 18:20:59 +0000 (-0400) Subject: kiss-git: new script X-Git-Url: https://git.armaanb.net/?p=bin.git;a=commitdiff_plain;h=4f23b8cfa441f439dfe849198fe10501c5d20254 kiss-git: new script --- diff --git a/kiss-git b/kiss-git new file mode 100755 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