From 0058fcd818c185356da9f16caf1306367500ecca Mon Sep 17 00:00:00 2001 From: WickedYoda <68271168+wickedyoda@users.noreply.github.com> Date: Thu, 9 May 2024 16:02:52 -0500 Subject: [PATCH] sad sad --- update-from_repo.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/update-from_repo.sh b/update-from_repo.sh index 4149b12..c119887 100644 --- a/update-from_repo.sh +++ b/update-from_repo.sh @@ -6,11 +6,11 @@ remote_repo="https://github.com/wickedyoda/public-setupfiles.git" # Specify the local file path local_file="./pubic-setupfiles" -# Check if the local file exists -if [ -f "$local_file" ]; then - # Pull the latest updates from the remote repository - git -C "$local_file" pull "$remote_repo" -else - # Clone the remote repository to the local file path - git clone "$remote_repo" "$local_file" +# Check if the local file path exists and is not empty +if [ -d "$local_file" ] && [ -n "$(ls -A $local_file)" ]; then + # Delete the existing directory + rm -rf "$local_file" fi + +# Clone the remote repository to the local file path +git clone "$remote_repo" "$local_file"