summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
authorTyler Davis <tyler@gluecode.net>2024-08-16 17:49:18 +0000
committerTyler Davis <tyler@gluecode.net>2024-08-16 17:49:18 +0000
commitbaa5e87507c001299e12069b20488e6f04721926 (patch)
treeef5ffa718345f05dd38cc753b2d064c551b46929 /.local
parenta4299af32e9f05c53bb7204280f641b82ad25dec (diff)
downloaddotfiles-baa5e87507c001299e12069b20488e6f04721926.tar.gz
dotfiles-baa5e87507c001299e12069b20488e6f04721926.zip
bin: add verbose output to fetchgit
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/fetchgit22
-rw-r--r--.local/share/git/repolist2
2 files changed, 24 insertions, 0 deletions
diff --git a/.local/bin/fetchgit b/.local/bin/fetchgit
index 7ec1d32..a8be80f 100755
--- a/.local/bin/fetchgit
+++ b/.local/bin/fetchgit
@@ -1,5 +1,24 @@
#!/usr/bin/env sh
+verbose=0 # Variables to be evaluated as shell arithmetic should be initialized to a default or validated beforehand.
+while :; do
+ case $1 in
+ -v)
+ verbose=$((verbose + 1)) # Each -v argument adds 1 to verbosity.
+ ;;
+ --) # End of all options.
+ shift
+ break
+ ;;
+ -?*)
+ printf 'WARN: Unknown option (ignored): %s\n' "$1" >&2
+ ;;
+ *) # Default case: If no more options then break out of the loop.
+ break ;;
+ esac
+ shift
+done
+
CWD=$PWD
if [ "$#" -gt 0 ]; then
for d in "$@"; do
@@ -8,6 +27,9 @@ if [ "$#" -gt 0 ]; then
*) cd ${d} ;;
esac
+ if [ $verbose -gt 0 ]; then
+ echo $PWD
+ fi
if [ ! -d .git ]; then # If $PWD/.git doesn't exist
# then are we in a ".git" dir? jump up one dir
if [ ${PWD##*/} = ".git" ]; then
diff --git a/.local/share/git/repolist b/.local/share/git/repolist
index b5a6f55..fe5898a 100644
--- a/.local/share/git/repolist
+++ b/.local/share/git/repolist
@@ -1,6 +1,8 @@
cs631apue,origin=git@github.com:jschauma/cs631apue.git
dark-mode-notify,origin=https://github.com/bouk/dark-mode-notify.git
+housecat,origin=https://github.com/mortie/housecat.git
hut,origin=https://git.sr.ht/~xenrox/hut
journal,origin=git@git.sr.ht:~tydavis/journal
+luapress,origin=https://github.com/Fizzadar/Luapress.git
newsraft,origin=git@git.sr.ht:~tydavis/newsraft,upstream=https://codeberg.org/newsraft/newsraft.git
resume,origin=git@git.sr.ht:~tydavis/resume