[X2Go-Commits] [buildscripts] 01/06: bin/build-rpm-package: correctly extract SuSE major version (or else nothing at all.)
git-admin at x2go.org
git-admin at x2go.org
Sun Dec 4 06:54:35 CET 2016
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository buildscripts.
commit c8cc91374ae455561fd74ab541bbc373e36686ef
Author: Mihai Moldovan <ionic at ionic.de>
Date: Sun Dec 4 04:20:56 2016 +0100
bin/build-rpm-package: correctly extract SuSE major version (or else nothing at all.)
---
bin/build-rpm-package | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index 371b1c0..15633cc 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -752,7 +752,7 @@ build_packages() {
BUILD_RESULT="/home/abuild/rpmbuild/"
typeset -i tmp_suse_major_version="0"
- tmp_suse_major_version="$(sed -e 's/\([0-9]*\).*/\1/' <<< "${l_CODENAME}")"
+ tmp_suse_major_version="$(sed -e '/^\([0-9][0-9]*\)\.[0-9][0-9]*$/!d;s//\1/' <<< "${l_CODENAME}")"
if [ "x${tmp_suse_major_version}" = "x0" ]; then
echo "Unable to extract SUSE version."
@@ -1009,7 +1009,7 @@ upload_packages() {
distro_string="OpenSuSE:"
typeset -i tmp_suse_major_version="0"
- tmp_suse_major_version="$(sed -e 's/\([0-9]*\).*/\1/' <<< "${l_CODENAME}")"
+ tmp_suse_major_version="$(sed -e '/^\([0-9][0-9]*\)\.[0-9][0-9]*$/!d;s//\1/' <<< "${l_CODENAME}")"
if [ "x${tmp_suse_major_version}" = "x0" ]; then
echo "Unable to extract SUSE version."
--
Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
More information about the x2go-commits
mailing list