+2006-02-16 Marius Mauch <genone@gentoo.org>
+ * euse: add/remove use flags even if there is no USE= statement in make.conf
+ (bug #95432)
+
2006-02-16 Marius Mauch <genone@gentoo.org>
* glsa-check: Fix bug causing the wrong summary to be displayed
for --test --verbose (bug #123084)
# on our own here. Basically just skip everything between USE=" and the
# closing ", printing our new USE line there instead.
inuse=0
+ had_use=0
(while read -r line; do
[ "${line:0:4}" == "USE=" ] && inuse=1
[ "${inuse}" == "0" ] && echo -E "${line}"
echo -ne "${NEW_MAKE_CONF_USE_2%% }"
echo '"'
inuse=0
+ had_use=1
fi
- done ) < "${MAKE_CONF_BACKUP_PATH}" | sed -e 's:\\ $:\\:' > "${MAKE_CONF_PATH}"
+ done
+ if [ ${haduse} -eq 0 ]; then
+ echo -n 'USE="'
+ echo -ne "${NEW_MAKE_CONF_USE_2%% }"
+ echo '"'
+ fi ) < "${MAKE_CONF_BACKUP_PATH}" | sed -e 's:\\ $:\\:' > "${MAKE_CONF_PATH}"
echo "${MAKE_CONF_PATH} was modified, a backup copy has been placed at ${MAKE_CONF_BACKUP_PATH}"
}