From c359b2b374511f3591cfc5724aa051b0c71f0cac Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Sat, 3 Nov 2007 09:29:09 +0000 Subject: [PATCH] Stefan Fiedler: scripts/Create-PkgUpdPatch: use _ instead of - to separate name and version; this makes the script usable for packages with a name containing - (package names must not contain _) [2007100820470117549] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@8807 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- scripts/Create-PkgUpdPatch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/Create-PkgUpdPatch b/scripts/Create-PkgUpdPatch index 91e4c1c7b..bf1ae9df4 100755 --- a/scripts/Create-PkgUpdPatch +++ b/scripts/Create-PkgUpdPatch @@ -56,18 +56,18 @@ while read x ; do if [ "${x//=/}" != "${x}" ] ; then pkg="${x%%=*}" xpkg="${x#*=}" - newver="${xpkg##*-}" + newver="${xpkg#*_}" xpkg="${xpkg%-*}" else - pkg="${x%-*}" + pkg="${x%%_*}" xpkg="${pkg}" - newver="${x##*-}" + newver="${x#*_}" fi for var in pkg xpkg newver ; do if [ -z "$( eval echo \$${var} )" ] ; then echo "ERROR: Please specify package and version in this format:" >&2 - echo "ERROR: package-version package=xpackage-version" >&2 + echo "ERROR: package_version package=xpackage_version" >&2 echo "ERROR: You entered: $x" >&2 continue 2 fi