Watch
1
0
Fork
You've already forked Zoe-Dotfiles
0
mirror of synced 2026-11-04 00:47:18 +00:00

Added a few scripts to make my life a tiny bit easier; updated some things (i forgor)

This commit is contained in:
MysteryBirb 2026-10-01 22:21:27 +02:00
commit c4ebdccebe
6 changed files with 62 additions and 11 deletions

34
zgit Executable file
View file

@ -0,0 +1,34 @@
#!/bin/bash
# This is just to update my git repo a tiny bit faster
usage() { echo "Usage: $0 [-a \"<string>\"] [-s <file>]" 1>&2; exit 1; }
while getopts "a:s:" o; do
case "${o}" in
a)
a=${OPTARG}
git add .
git commit -m "$a"
git push
exit 0
;;
s)
s=${OPTARG}
if [ -f $s ]; then
git add $s
read -p "Commit message: " commitMsg
tmp="${commitMsg%\"}"
tmp="${tmp#\"}"
git commit -m "$tmp"
git push
else
echo "$s is not a regular file!"
exit 1
fi
;;
*)
usage
;;
esac
done
#shift $((OPTIND-1))