update auto clone script

This commit is contained in:
Laila van Reenen 2024-12-11 18:33:22 +01:00
parent 4782da078d
commit fd4ae2be09
Signed by: LailaTheElf
GPG Key ID: 1F4E6EE3E6DDF769

8
configs/auto_clone.sh Normal file → Executable file
View File

@ -20,14 +20,14 @@ do
full_name="$(echo "$repo_json" | sed -e 's/^.*"full_name":"\([^"]*\)".*$/\1/')" full_name="$(echo "$repo_json" | sed -e 's/^.*"full_name":"\([^"]*\)".*$/\1/')"
ssh_url="$(echo "$repo_json" | sed -e 's/^.*"ssh_url":"\([^"]*\)".*$/\1/')" ssh_url="$(echo "$repo_json" | sed -e 's/^.*"ssh_url":"\([^"]*\)".*$/\1/')"
echo echo
echo "### $full_name" echo "### ${full_name,,}"
if [ -d "$project_dir/$full_name" ] if [ -d "$project_dir/${full_name,,}" ]
then then
cd "$project_dir/$full_name" cd "$project_dir/${full_name,,}"
git fetch git fetch
else else
git clone "$ssh_url" "$project_dir/$full_name" git clone "$ssh_url" "$project_dir/${full_name,,}"
fi fi
done done