Skip to content

Commit

Permalink
variable fix
Browse files Browse the repository at this point in the history
closes #10
  • Loading branch information
boredsquirrel authored Dec 5, 2024
1 parent dbc38fa commit 523c9f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions copr
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ elif [[ "$1" == "remove" ]]; then
if [[ -e "$repofile" ]]; then
# Backup existing repo file and set ownership to the user
pkexec cp "$repofile" "$repofilebak" &&
pkexec chown "$USER" "$backup_file" &&
pkexec chown "$USER" "$repofilebak" &&
echo "Backup created in your home folder."

# Remove the repo file
Expand All @@ -135,8 +135,8 @@ elif [[ "$1" == "remove" ]]; then
# if found, make sure it is the right one
read -rp 'Repo "$result" was found. Do you want to backup and remove this repo? (Y/N) ' answer
if [[ "${answer,,}" == "y" ]]; then
pkexec cp "$result" "$backup_file" &&
pkexec chown "$(whoami)" "$backup_file" &&
pkexec cp "$result" "$repofilebak" &&
pkexec chown "$(whoami)" "$repofilebak" &&
pkexec rm "$result" || # && echo 'COPR Repository "$reponame" removed.' \
echo "ERROR removing COPR repository."
fi
Expand Down

0 comments on commit 523c9f6

Please sign in to comment.