diff --git a/EESSI-remove-software.sh b/EESSI-remove-software.sh index c0818db393..582ed61a7f 100755 --- a/EESSI-remove-software.sh +++ b/EESSI-remove-software.sh @@ -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." @@ -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