Skip to content

Commit

Permalink
remove script is not run by root anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
truib committed Nov 13, 2024
1 parent bcb0b65 commit 0fb455d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions EESSI-remove-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ fi
pr_diff=$(ls [0-9]*.diff | head -1)

# if this script is run as root, use PR patch file to determine if software needs to be removed first
if [ $EUID -eq 0 ]; then
if [ $EUID -ne 0 ]; then
changed_easystacks_rebuilds=$(cat ${pr_diff} | grep '^+++' | cut -f2 -d' ' | sed 's@^[a-z]/@@g' | grep 'easystacks/.*yml$' | egrep -v 'known-issues|missing' | grep "/rebuilds/")
if [ -z ${changed_easystacks_rebuilds} ]; then
echo "No software needs to be removed."
Expand Down Expand Up @@ -141,5 +141,6 @@ if [ $EUID -eq 0 ]; then
done
fi
else
fatal_error "This script can only be run by root!"
# fatal_error "This script can only be run by root!"
fatal_error "This script must not be run by root!"
fi

0 comments on commit 0fb455d

Please sign in to comment.