From 8d9264e5c99998ab70509cdfcf5634a0e4f659a6 Mon Sep 17 00:00:00 2001 From: Marius Tolzmann Date: Wed, 20 Jul 2011 15:08:22 +0200 Subject: [PATCH] hooks: grep more specific --- src/hooks.d/gdk-pixbuf-query-loaders.sh | 2 +- src/hooks.d/glib-compile-schemas.sh | 2 +- src/hooks.d/gtk-update-icon-cache.sh | 2 +- src/hooks.d/mkfontdir-mkfontscale.sh | 2 +- src/hooks.d/update-desktop-database.sh | 2 +- src/hooks.d/update-mime-database.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/hooks.d/gdk-pixbuf-query-loaders.sh b/src/hooks.d/gdk-pixbuf-query-loaders.sh index 078cc0b..8f660bc 100644 --- a/src/hooks.d/gdk-pixbuf-query-loaders.sh +++ b/src/hooks.d/gdk-pixbuf-query-loaders.sh @@ -14,7 +14,7 @@ fi gdk_pixbuf_moduledir=$(pkg-config --variable=gdk_pixbuf_moduledir gdk-pixbuf-2.0) gdk_pixbuf_cache_file=$(pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0) -if grep -q "${gdk_pixbuf_moduledir}" ${BEE_METADIR}/${pkg}/FILES ; then +if grep -q "file=${gdk_pixbuf_moduledir}" ${BEE_METADIR}/${pkg}/FILES ; then case "${action}" in "post-install") rm -f ${gdk_pixbuf_cache_file} diff --git a/src/hooks.d/glib-compile-schemas.sh b/src/hooks.d/glib-compile-schemas.sh index ecc9176..307ccc7 100644 --- a/src/hooks.d/glib-compile-schemas.sh +++ b/src/hooks.d/glib-compile-schemas.sh @@ -13,7 +13,7 @@ fi for dir in ${XDG_DATA_DIRS//:/ } ; do schema_dir=${dir}/glib-2.0/schemas - if grep -q ${schema_dir} ${BEE_METADIR}/${pkg}/FILES ; then + if grep -q "file=${schema_dir}" ${BEE_METADIR}/${pkg}/FILES ; then case "${action}" in "post-install") rm -f ${schema_dir}/gschemas.compiled diff --git a/src/hooks.d/gtk-update-icon-cache.sh b/src/hooks.d/gtk-update-icon-cache.sh index 1acbc70..c6b80e2 100644 --- a/src/hooks.d/gtk-update-icon-cache.sh +++ b/src/hooks.d/gtk-update-icon-cache.sh @@ -13,7 +13,7 @@ fi for dir in ${XDG_DATA_DIRS//:/ } ; do icon_base_dir=${dir}/icons - for line in $(grep -h "${icon_base_dir}/.*/index.theme" ${BEE_METADIR}/${pkg}/FILES) ; do + for line in $(grep -h "file=${icon_base_dir}/.*/index.theme" ${BEE_METADIR}/${pkg}/FILES) ; do eval $(beesep ${line}) icon_dir=${file%%/index.theme} case "${action}" in diff --git a/src/hooks.d/mkfontdir-mkfontscale.sh b/src/hooks.d/mkfontdir-mkfontscale.sh index 199c016..1b8d7eb 100644 --- a/src/hooks.d/mkfontdir-mkfontscale.sh +++ b/src/hooks.d/mkfontdir-mkfontscale.sh @@ -32,7 +32,7 @@ function update_fonts() { for dir in ${XDG_DATA_DIRS//:/ } ; do font_base_dir=${dir}/fonts - if grep -q ${font_base_dir} ${BEE_METADIR}/${pkg}/FILES ; then + if grep -q "file=${font_base_dir}" ${BEE_METADIR}/${pkg}/FILES ; then case "${action}" in "post-install") clean_font_dirs ${font_base_dir} diff --git a/src/hooks.d/update-desktop-database.sh b/src/hooks.d/update-desktop-database.sh index fdb89a9..7281f78 100644 --- a/src/hooks.d/update-desktop-database.sh +++ b/src/hooks.d/update-desktop-database.sh @@ -13,7 +13,7 @@ fi for dir in ${XDG_DATA_DIRS//:/ } ; do desktop_dir=${dir}/applications - if grep -q "${desktop_dir}/.*\.desktop" ${BEE_METADIR}/${pkg}/FILES ; then + if grep -q "file=${desktop_dir}/.*\.desktop" ${BEE_METADIR}/${pkg}/FILES ; then case "${action}" in "post-install") rm -f ${desktop_dir}/mimeinfo.cache diff --git a/src/hooks.d/update-mime-database.sh b/src/hooks.d/update-mime-database.sh index 5d157f5..607ae51 100644 --- a/src/hooks.d/update-mime-database.sh +++ b/src/hooks.d/update-mime-database.sh @@ -13,7 +13,7 @@ fi for dir in ${XDG_DATA_DIRS//:/ } ; do mime_dir=${dir}/mime - if grep -q "${mime_dir}/packages" ${BEE_METADIR}/${pkg}/FILES ; then + if grep -q "file=${mime_dir}/packages" ${BEE_METADIR}/${pkg}/FILES ; then case "${action}" in "post-install") update-mime-database ${mime_dir}