diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-04-03 22:19:09 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-04-03 22:19:09 +0000 |
commit | 9fd9f2355cbfc030d16c5ca24433a87c88889637 (patch) | |
tree | 915462474ad44d71642517e0e032673b1a89053f /trunk/src/templatepkg | |
parent | 6ba7e185fde258f6040f16a2c4413352bc061fef (diff) | |
download | simplepkg-9fd9f2355cbfc030d16c5ca24433a87c88889637.tar.gz simplepkg-9fd9f2355cbfc030d16c5ca24433a87c88889637.tar.bz2 |
- 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
Diffstat (limited to 'trunk/src/templatepkg')
-rwxr-xr-x | trunk/src/templatepkg | 6 |
1 files changed, 3 insertions, 3 deletions
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 |