it will work with things like 'declare -xr' as well as 'declare -rx'.
(trunk r8605)
svn path=/main/branches/2.1.2/; revision=8606
# listed in READONLY_EBUILD_METADATA, since having any readonly attributes
# persisting in the saved environment can be inconvenient when it
# eventually needs to be reloaded.
- egrep -v -e "${var_grep}" | sed 's:^declare -rx:declare -x:'
+ egrep -v -e "${var_grep}" | sed 's:^declare[[:space:]]\+-\([[:alnum:]]*\)r\([[:alnum:]]*\)[[:space:]]\+:declare -\1\2 :'
}
# @FUNCTION: preprocess_ebuild_env