aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Mike Kelly <pioto@pioto.org> 2007-01-05 04:41:02 +0000
committerAvatar Mike Kelly <pioto@pioto.org> 2007-01-05 04:41:02 +0000
commitc5de7560c18875c13e3cad9e311b6b55b026e9f0 (patch)
tree18787970e5efd030608441cb90c1b2865f38a3ed
parentf32d3dadb90f32f676ef1602bbb0caf148634c6e (diff)
downloadpaludis-c5de7560c18875c13e3cad9e311b6b55b026e9f0.tar.gz
paludis-c5de7560c18875c13e3cad9e311b6b55b026e9f0.tar.xz
Cleanup a bit. Make our paludis calls silent. Use pretty colored einfo and ewarn calls instead of boring old echo.
-rwxr-xr-xhooks/update_config_protect_list.bash18
1 files changed, 11 insertions, 7 deletions
diff --git a/hooks/update_config_protect_list.bash b/hooks/update_config_protect_list.bash
index d7c3861..735ceae 100755
--- a/hooks/update_config_protect_list.bash
+++ b/hooks/update_config_protect_list.bash
@@ -17,32 +17,36 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-vdb_loc=$(${PALUDIS_COMMAND} --configuration-variable installed location )
+source ${PALUDIS_EBUILD_DIR}/echo_functions.bash
+
+vdb_loc="$(${PALUDIS_COMMAND} --log-level silent --configuration-variable installed location )"
cfg_protect_list="${vdb_loc}/.cache/all_CONFIG_PROTECT"
cfg_protect_mask_list="${vdb_loc}/.cache/all_CONFIG_PROTECT_MASK"
if [[ ! -f "${cfg_protect_list}" || ! -f "${cfg_protect_mask_list}" ]] ; then
# Generate this list for the first time. *slow*
- echo "Creating the CONFIG_PROTECT and CONFIG_PROTECT_MASK lists."
- echo "This will take a while."
+ ewarn "Creating the CONFIG_PROTECT and CONFIG_PROTECT_MASK lists."
+ ewarn "This will take a while."
+ [[ -d "${vdb_loc}/.cache" ]] || mkdir ${vdb_loc}/.cache || return 1
> "${cfg_protect_list}"
> "${cfg_protect_mask_list}"
- installed_pkgs=$(${PALUDIS_COMMAND} --list-packages --repository installed |grep "^*" |cut -d" " -f2)
+ installed_pkgs=$(${PALUDIS_COMMAND} --log-level silent --list-packages --repository installed |grep "^*" |cut -d" " -f2)
for p in ${installed_pkgs} ; do
- cfg_protect=$(${PALUDIS_COMMAND} --environment-variable ${p} CONFIG_PROTECT)
+ cfg_protect=$(${PALUDIS_COMMAND} --log-level silent --environment-variable ${p} CONFIG_PROTECT)
for x in ${cfg_protect} ; do
echo "${x}" >> "${cfg_protect_list}"
done
- cfg_protect_mask=$(${PALUDIS_COMMAND} --environment-variable ${p} CONFIG_PROTECT_MASK)
+ cfg_protect_mask=$(${PALUDIS_COMMAND} --log-level silent --environment-variable ${p} CONFIG_PROTECT_MASK)
for x in ${cfg_protect_mask} ; do
echo "${x}" >> "${cfg_protect_mask_list}"
done
done
+else
+ einfo "Updating CONFIG_PROTECT and CONFIG_PROTECT_MASK caches."
fi
-
# Now, update the lists with our current values.
for x in ${CONFIG_PROTECT} ; do
echo "${x}" >> "${cfg_protect_list}"