summaryrefslogtreecommitdiffstats
path: root/helper/fileutil.inc
diff options
context:
space:
mode:
authorSimon Rettberg2013-08-27 18:41:58 +0200
committerSimon Rettberg2013-08-27 18:41:58 +0200
commit399251bc12efd30a3fa12c83c815e96d0e1cb8bd (patch)
tree7e668f7f1d67ee7202aa5aad200434d11734bbb2 /helper/fileutil.inc
parent[xorg] Fix ubuntu config (diff)
downloadtm-scripts-399251bc12efd30a3fa12c83c815e96d0e1cb8bd.tar.gz
tm-scripts-399251bc12efd30a3fa12c83c815e96d0e1cb8bd.tar.xz
tm-scripts-399251bc12efd30a3fa12c83c815e96d0e1cb8bd.zip
[fileutil.inc] list_packet_files: Ignore output lines that do not start with a slash (e.g. dpkg messages about diverted files)
Diffstat (limited to 'helper/fileutil.inc')
-rw-r--r--helper/fileutil.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/helper/fileutil.inc b/helper/fileutil.inc
index c93e82b8..798f825a 100644
--- a/helper/fileutil.inc
+++ b/helper/fileutil.inc
@@ -38,9 +38,9 @@ list_packet_files() {
[ "x$OPTIONAL" = "x@" ] && PACKAGE="$(echo "$PACKAGE" | cut -c 2-)"
local FILES=""
if [ "$PACKET_MANAGER" = "apt" ]; then
- FILES="$(dpkg -L "$PACKAGE" | grep -v -E 'share/(man|doc)|/var/run|/var/log'; echo ":###:${PIPESTATUS[0]}")"
+ FILES="$(dpkg -L "$PACKAGE" | grep "^/" | grep -v -E 'share/(man|doc)|/var/run|/var/log'; echo ":###:${PIPESTATUS[0]}")"
elif [ "$PACKET_MANAGER" = "zypper" -o "$PACKET_MANAGER" = "yum" ]; then
- FILES="$(rpm -ql "$PACKAGE" | grep -v -E 'share/(doc|man)|/var/run|/var/log'; echo ":###:${PIPESTATUS[0]}")"
+ FILES="$(rpm -ql "$PACKAGE" | grep "^/" | grep -v -E 'share/(man|doc)|/var/run|/var/log'; echo ":###:${PIPESTATUS[0]}")"
fi
# ugly hack to get our return value
#local LPRET=$(echo "$FILES" | tail -1 | sed 's/^.*:###:\([0-9]*\)$/\1/g')