From 6f242c362653db2a0cec5449b37df692669eca32 Mon Sep 17 00:00:00 2001 From: Michel Fedde Date: Sun, 23 Feb 2025 23:05:31 +0100 Subject: [PATCH] Adds git repositories as bootstrap step --- .../yadm/bootstrap.d/40-GitRepositories.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 .config/yadm/bootstrap.d/40-GitRepositories.sh diff --git a/.config/yadm/bootstrap.d/40-GitRepositories.sh b/.config/yadm/bootstrap.d/40-GitRepositories.sh new file mode 100755 index 0000000..3387033 --- /dev/null +++ b/.config/yadm/bootstrap.d/40-GitRepositories.sh @@ -0,0 +1,19 @@ +#!/bin/env sh + +declare -A repositories + +repositories['~/DSA']="https://git.php.fail/neintonine/dsa.git" +repositories['~/Notes']="https://git.php.fail/neintonine/notes.git" + +for path in "${!repositories[@]}"; do + url=${repositories[$path]} + + if [ -d "$path" ]; then + echo "-- $path already exist... skipping clone" + continue + fi + + echo "-- Cloning to $path"; + git clone "$url" "$path" +done +