From bff683f79edb5a655eec4e5fafd8631d15b30402 Mon Sep 17 00:00:00 2001 From: Ronaldson Bellande <47253433+RonaldsonBellande@users.noreply.github.com> Date: Wed, 27 Sep 2023 23:44:04 -0400 Subject: [PATCH] Delete fix_errors.sh --- fix_errors.sh | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100755 fix_errors.sh diff --git a/fix_errors.sh b/fix_errors.sh deleted file mode 100755 index 2ebdbee..0000000 --- a/fix_errors.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -# Get the URL from .git/config -git_url=$(git config --get remote.origin.url) - -# Check if a URL is found -if [ -z "$git_url" ]; then - echo "No remote URL found in .git/config." - exit 1 -fi - -# Clone the repository into a temporary folder -git clone "$git_url" tmp_clone - -# Check if the clone was successful -if [ $? -eq 0 ]; then - # Remove the existing .git directory if it exists - if [ -d ".git" ]; then - rm -rf .git - fi - - # Copy the .git directory from the clone to the current repository - cp -r tmp_clone/.git . - - # Remove the clone directory - rm -rf tmp_clone - - echo "Repository cloned and .git directory copied successfully." -else - echo "Failed to clone the repository." -fi