Skip to content

Commit

Permalink
Gentoo: Fix issue where disabled flags would cause prepare script to …
Browse files Browse the repository at this point in the history
…halt.
  • Loading branch information
Joseph Jezak committed Apr 7, 2017
1 parent 723dd74 commit 5655d86
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions installer/gentoo/prepare
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ DISTROAKA='gentoo'
# Set global use flags, separated by a space
set_flags() {
while [ "$#" != 0 ]; do
# Remove the flag first to make sure it's not overriden anywhere
# Add the true to keep this from halting prepare.sh if the flag isn't set
euse -R "${1#-}" > /dev/null 2>&1 || true

# Check if the flag starts with a -, if so, we're disabling it
if [ "${1#-}" != "$1" ]; then
# Now turn it off
euse -D "${1#-}" 1> /dev/null
# If we haven't already set the flag, we can enable it
# Otherwise, we can enable it
else
if [ -z "$(euse -a "$1")" ]; then
euse -E "$1" 1> /dev/null
fi
euse -E "$1" 1> /dev/null
fi
shift
done
Expand Down

0 comments on commit 5655d86

Please sign in to comment.