diff options
Diffstat (limited to 'trunk')
-rw-r--r-- | trunk/Makefile | 3 | ||||
-rw-r--r-- | trunk/lib/common.sh | 17 | ||||
-rw-r--r-- | trunk/src/createpkg | 8 |
3 files changed, 15 insertions, 13 deletions
diff --git a/trunk/Makefile b/trunk/Makefile index 7055dc9..766414f 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -15,7 +15,8 @@ # PACKAGE = simplepkg -VERSION = $(shell echo '$$Rev$$' | sed -e 's/[^0-9]//g')_svn +#VERSION = $(shell echo '$$Rev$$' | sed -e 's/[^0-9]//g')_svn +VERSION = 812_teste5 BUILD = 1rha PREFIX = /usr INSTALL = /usr/bin/install diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index f05b276..ea4130d 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -60,7 +60,7 @@ function pkg_ext_sed { # list all possible package extensions # sed regexp version - echo "($(pkg_ext $1))" | sed -e 's/ /\\|/g' + echo "\($(pkg_ext $1)\)" | sed -e 's/ /\\|/g' } @@ -69,7 +69,7 @@ function pkg_ext_find { # list all possible package extensions # find expr version - local match + local match exts if [ ! -z "$1" ]; then match="$1" @@ -77,7 +77,8 @@ function pkg_ext_find { match="*" fi - echo "($(pkg_ext $match))" | sed -e 's/ / -or -name /g' + exts="`echo "$(pkg_ext $match)" | sed -e 's/ / -or -name /g'`" + echo "( -name $exts )" } @@ -1381,18 +1382,18 @@ function gen_meta { file="$1" fi - if [ "`echo $file | grep -E "(.*{1,})\-(.*[\.\-].*[\.\-].*).$(pkg_ext_grep)[ ]{0,}$"`" == "" ]; then + if [ "`echo $file | grep -E \"(.*{1,})\-(.*[\.\-].*[\.\-].*).$(pkg_ext_grep)[ ]{0,}$\"`" == "" ]; then return fi - NAME=$(echo $file | sed -re "s/(.*\/)(.*.$(pkg_ext_sed))$/\2/") - LOCATION=$(echo $file | sed -re "s/(.*)\/(.*.$(pkg_ext_sed))$/\1/") + NAME=$(basename $file) + LOCATION=$(dirname $file) SIZE=$( expr `gunzip -l $file | tail -n 1 | awk '{ print $1 }'` / 1024 ) USIZE=$( expr `gunzip -l $file | tail -n 1 | awk '{ print $2 }'` / 1024 ) REQUIRED=$(tar xzfO $file install/slack-required 2>/dev/null | grep -v -e "^#" | xargs -r -iZ echo -n "Z," | sed -e "s/,$//") CONFLICTS=$(tar xzfO $file install/slack-conflicts 2>/dev/null | grep -v -e "^#" | xargs -r -iZ echo -n "Z," | sed -e "s/,$//") SUGGESTS=$(tar xzfO $file install/slack-suggests 2>/dev/null | grep -v -e "^#" | xargs -r ) - METAFILE="$(strip_pkg_exp $NAME).meta" + METAFILE="$(strip_pkg_ext $NAME).meta" echo "PACKAGE NAME: $NAME" > $LOCATION/$METAFILE @@ -1413,7 +1414,7 @@ function gen_meta { echo "" >> $LOCATION/$METAFILE echo "Created metafile for `basename $file`" - ( cd `dirname $file` && svn_add `strip_pkg_exp $file`.meta ) + ( cd `dirname $file` && svn_add `strip_pkg_ext $file`.meta ) } diff --git a/trunk/src/createpkg b/trunk/src/createpkg index 65af714..584e2e7 100644 --- a/trunk/src/createpkg +++ b/trunk/src/createpkg @@ -451,7 +451,7 @@ function remove_old_package_data { else # Using -mindepth 2 so it doesn't delete the new package - find $makepkg_repos -mindepth 2 $(package_ext_find $PACKAGE-*-*-*) -exec rm {} 2>/dev/null \; + find $makepkg_repos -mindepth 2 $(pkg_ext_find $PACKAGE-*-*-*) -exec rm {} 2>/dev/null \; find $makepkg_repos -mindepth 2 -name "$PACKAGE-*-*-*.meta" -exec rm {} 2>/dev/null \; find $makepkg_repos -mindepth 2 -name "$PACKAGE-*-*-*.*.asc" -exec rm {} 2>/dev/null \; find $makepkg_repos -name "$PACKAGE.slack-required" -exec rm {} 2>/dev/null \; @@ -486,7 +486,7 @@ function update_metadata { found_patch="no" - for file in `find patches/ $(package_ext_find $PACKAGE-*-*-*)`; do + for file in `find patches/ $(pkg_ext_find $PACKAGE-*-*-*)`; do found_patch="yes" update_md5_checksum $makepkg_repos/patches patches/$SUBFOLDER/$PKG_NAME done @@ -513,7 +513,7 @@ function list_packages { for repository in $repositories; do echo "Packages from $repository..." - find $repository $(package_ext_find) + find $repository $(pkg_ext_find) done } @@ -539,7 +539,7 @@ function remove_package { cd $repository - for file in `find . $(package_ext_find $package-*-*-*) -o -name "$package-*-*-*.meta" -o -name "$package-*-*-*.*.asc"`; do + for file in `find . $(pkg_ext_find $package-*-*-*) -o -name "$package-*-*-*.meta" -o -name "$package-*-*-*.*.asc"`; do svn_del $file if [ -e "CHECKSUMS.md5" ] && echo $file | grep -q -E -e "$(pkg_ext_grep)$"; then # remove md5 information |