From: rhatto Date: Sat, 9 Dec 2006 16:55:22 +0000 (+0000) Subject: common.sh fix X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=9492c0627297d9f0fa12a60427658c3f8e4e31f3;p=simplepkg.git common.sh fix git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@55 04377dda-e619-0410-9926-eae83683ac58 --- diff --git a/lib/common.sh b/lib/common.sh index 6f66050..9eb5753 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -61,7 +61,7 @@ function package_version { local file pack version file="`basename $1`" pack="`package_name $1`" - version="`echo $file | sed -e "s/^$pack//" | cut -d "-" -f 1`" + version="`echo $file | sed -e "s/^$pack-//" | cut -d "-" -f 1`" echo $version } @@ -72,7 +72,7 @@ function package_arch { local file pack arch file="`basename $1`" pack="`package_name $1`" - arch="`echo $file | sed -e "s/^$pack//" | cut -d "-" -f 2`" + arch="`echo $file | sed -e "s/^$pack-//" | cut -d "-" -f 2`" echo $arch } @@ -83,7 +83,7 @@ function package_build { local file pack build file="`basename $1`" pack="`package_name $1`" - build="`echo $file | sed -e "s/^$pack//" | cut -d "-" -f 3`" + build="`echo $file | sed -e "s/^$pack-//" | cut -d "-" -f 3`" echo $build }