diff options
author | Tyler Davis <tydavis@gmail.com> | 2020-02-25 18:32:07 +0000 |
---|---|---|
committer | Tyler Davis <tydavis@gmail.com> | 2020-02-25 18:32:07 +0000 |
commit | 1e027f49e1ecf487621e15d42d0e7b1447f257ad (patch) | |
tree | befd85402f82ec1891882aa59f681f6daafd3ff9 /.bin | |
parent | bfa324ae08fa4cc11e54e139d44baaf7ec0a8671 (diff) | |
download | dotfiles-1e027f49e1ecf487621e15d42d0e7b1447f257ad.tar.gz dotfiles-1e027f49e1ecf487621e15d42d0e7b1447f257ad.zip |
feat(git): update to match other repo
Diffstat (limited to '.bin')
-rwxr-xr-x | .bin/allupdate (renamed from .bin/allupdate.sh) | 5 | ||||
-rwxr-xr-x | .bin/upgit | 23 |
2 files changed, 26 insertions, 2 deletions
diff --git a/.bin/allupdate.sh b/.bin/allupdate index a23e445..0be5a01 100755 --- a/.bin/allupdate.sh +++ b/.bin/allupdate @@ -5,13 +5,14 @@ case "$OSTYPE" in brew update; brew upgrade; brew cleanup; - fd -H -t d -E mod -E vendor '.git$' ~/ -x bash -c "cd {//}; git fetch --all --prune ; git merge --ff-only; " ; ;; linux*) sudo pacman -Syu; fd -H -t d -E mod -E vendor '.git$' ~/code/work -x bash -c "cd {//}; git config user.email tyler.m.davis@nordstrom.com; git config http.cookiefile /home/tydavis/.gitcookie-work; " ; - fd -H -t d -E mod -E vendor '.git$' ~/ -x bash -c "cd {//}; git fetch --all --prune ; git merge --ff-only; " ; ;; esac +fd -H -t d -E mod -E vendor '.git$' ~/ -x bash -c "cd {//}; ~/.bin/fetchgit;" ; gcloud components update -q; + + diff --git a/.bin/upgit b/.bin/upgit new file mode 100755 index 0000000..ab44207 --- /dev/null +++ b/.bin/upgit @@ -0,0 +1,23 @@ +#!/usr/bin/env zsh + +# Make sure to always start in $HOME +cd $HOME; + +# Always remove the existing file so we let git compare +[ -e ~/.setup/gitlist ] && rm ~/.setup/gitlist +touch ~/.setup/gitlist + +# Iterate through all code folders and produce a CSV of +# folder,remote=URL,remote2=URL +# and so on +for p in $(fd -H -t d '.git$' code); do + cd $p/.. + echo -n ${p%.git} >> ~/.setup/gitlist + for r in $(git remote); do + # get remote URL + echo -n ,$r=$(git config --get remote.$r.url) >> ~/.setup/gitlist + done + echo "" >> ~/.setup/gitlist + cd $HOME +done + |