From 9fd9f2355cbfc030d16c5ca24433a87c88889637 Mon Sep 17 00:00:00 2001 From: rhatto Date: Tue, 3 Apr 2007 22:19:09 +0000 Subject: - jail-commit warning for file not found - repos: cosmetic changes - templatepkg: now supports a tagfile or slack-required as a template git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@212 04377dda-e619-0410-9926-eae83683ac58 --- trunk/src/templatepkg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'trunk/src/templatepkg') diff --git a/trunk/src/templatepkg b/trunk/src/templatepkg index c9771b7..8faab89 100755 --- a/trunk/src/templatepkg +++ b/trunk/src/templatepkg @@ -147,7 +147,7 @@ function template_update { for package in `ls -1 $ROOT/var/log/packages/`; do pack=`package_name $package` if [ -f $TEMPLATE ]; then - if ! `grep -v -e "^#" $TEMPLATE | cut -d : -f 1 | grep -q -e "^$pack\$"`; then + if ! `grep -v -e "^#" $TEMPLATE | cut -d : -f 1 | awk '{ print $1 }' | grep -q -e "^$pack\$"`; then echo $pack >> $TEMPLATE echo Added $pack on $TEMPLATE fi @@ -158,7 +158,7 @@ function template_update { done # check if each package from the template is installed - grep -v -e "^#" $TEMPLATE | cut -d : -f 1 | while read pack; do + grep -v -e "^#" $TEMPLATE | cut -d : -f 1 | awk '{ print $1 }' | while read pack; do if [ ! -z "$pack" ]; then unset found @@ -171,7 +171,7 @@ function template_update { done if [ "$found" != "1" ]; then # remove a non-installed package from the template - sed "/^$pack$/d" $TEMPLATE | sed "/^$pack $/d" | sed "/^$pack:*/d" > $TEMPLATE.tmp + sed "/^$pack$/d" $TEMPLATE | sed "/^$pack $/d" | sed "/^$pack:*/d" | sed "/^$pack */d" > $TEMPLATE.tmp cat $TEMPLATE.tmp > $TEMPLATE rm -f $TEMPLATE.tmp echo Removed $pack from $TEMPLATE -- cgit v1.2.3