diff options
author | Tim Keller <tjkeller.xyz> | 2025-02-06 22:03:18 -0600 |
---|---|---|
committer | Tim Keller <tjkeller.xyz> | 2025-02-06 22:03:18 -0600 |
commit | b03202e3ff9af9c961f813332c962913b6f81d22 (patch) | |
tree | a542f59b2c77c50622988155ce58d363c37f884b /modules/home/resources/activation-scripts/clone-repos.sh | |
parent | 56aa812441c150da6f27d7c848d3e3eb2ded4435 (diff) | |
download | nixos-b03202e3ff9af9c961f813332c962913b6f81d22.tar.xz nixos-b03202e3ff9af9c961f813332c962913b6f81d22.zip |
pull repos if existing and firefox add search engine for nixos options
Diffstat (limited to 'modules/home/resources/activation-scripts/clone-repos.sh')
-rw-r--r-- | modules/home/resources/activation-scripts/clone-repos.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/home/resources/activation-scripts/clone-repos.sh b/modules/home/resources/activation-scripts/clone-repos.sh index 887968b..eaee4dc 100644 --- a/modules/home/resources/activation-scripts/clone-repos.sh +++ b/modules/home/resources/activation-scripts/clone-repos.sh @@ -3,8 +3,14 @@ server="https://git.tjkeller.xyz/" clonemissing() { + # pull and return if already existing + if [ -d "$2"/.git ]; then + run cd $VERBOSE_ARG "$2" + run git pull $VERBOSE_ARG || echo "$2: failed to pull from remote" + return + fi + # clone to $2 - [ -d "$2"/.git ] && return run mkdir -p $VERBOSE_ARG "$2" run git clone $VERBOSE_ARG "$server$1" "$2" |