This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository buildscripts. from bffe0a8 bin/build-deb-package: drop spurious Debian in nightly builds description, add numerical version to release description and use capitalized distro name in all descriptions. new 3153ec5 bin/{debian,ubuntu}-codename-to-version.sh: fix various shortcomings: new d960c90 bin/build-deb-package: fix various issues: The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: bin/build-deb-package | 14 +++++++++----- bin/debian-codename-to-version.sh | 14 +++++++++++--- bin/ubuntu-codename-to-version.sh | 14 +++++++++++--- 3 files changed, 31 insertions(+), 11 deletions(-) -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 3153ec59c323cdc2efb3d394f0e4e2f98ca28c93 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Jul 4 21:42:28 2016 +0200 bin/{debian,ubuntu}-codename-to-version.sh: fix various shortcomings: - return can only be used in functions. Switch to "exit" instead. - typeset -l makes the content lowercase, not the variable "local" (that's implied by using typeset.) Hence, drop it where inappropriate. - typeset -l is only available in BASH 4 and higher. Use it conditionally only. - Use tr to convert strings to lowercase when using a BASH version lower than 4. --- bin/debian-codename-to-version.sh | 14 +++++++++++--- bin/ubuntu-codename-to-version.sh | 14 +++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/bin/debian-codename-to-version.sh b/bin/debian-codename-to-version.sh index 8bd0384..42f497b 100755 --- a/bin/debian-codename-to-version.sh +++ b/bin/debian-codename-to-version.sh @@ -29,10 +29,18 @@ unset CDPATH # The return code is either 0, iff mapping was successful, # or 1 if the code name is unknown and mapping failed. -typeset -l codename +# Where supported (BASH 4 and higher), automatically +# lower-case the codename argument. +if [ -n "${BASH_VERSINFO[0]}" ] && [ "${BASH_VERSINFO[0]}" -gt 3 ]; then + typeset -l codename +fi codename="${1:?"No code name provided."}" -typeset -l -i ret="0" +if [ -z "${BASH_VERSINFO[0]}" ] || [ "${BASH_VERSINFO[0]}" -lt 4 ]; then + codename="$(tr '[:upper:]' '[:lower:]' <<< "${codename}")" +fi + +typeset -i ret="0" case "${codename}" in # The first version number is actually "fake", @@ -79,4 +87,4 @@ case "${codename}" in (*) ret="1";; esac -return "${ret}" +exit "${ret}" diff --git a/bin/ubuntu-codename-to-version.sh b/bin/ubuntu-codename-to-version.sh index 943e130..f2884cf 100755 --- a/bin/ubuntu-codename-to-version.sh +++ b/bin/ubuntu-codename-to-version.sh @@ -28,10 +28,18 @@ unset CDPATH # The return code is either 0, iff mapping was successful, # or 1 if the code name is unknown and mapping failed. -typeset -l codename +# Where supported (BASH 4 and higher), automatically +# lower-case the codename argument. +if [ -n "${BASH_VERSINFO[0]}" ] && [ "${BASH_VERSINFO[0]}" -gt 3 ]; then + typeset -l codename +fi codename="${1:?"No code name provided."}" -typeset -l -i ret="0" +if [ -z "${BASH_VERSINFO[0]}" ] || [ "${BASH_VERSINFO[0]}" -lt 4 ]; then + codename="$(tr '[:upper:]' '[:lower:]' <<< "${codename}")" +fi + +typeset -i ret="0" case "${codename}" in # The first version number is actually "fake", @@ -69,4 +77,4 @@ case "${codename}" in (*) ret="1";; esac -return "${ret}" +exit "${ret}" -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit d960c909d4b3b35cd081c50b445947edf8dc62ba Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Jul 4 21:53:34 2016 +0200 bin/build-deb-package: fix various issues: - typeset -l makes the content lowercase, not the variable "local" (that's implied by using typeset.) Hence, drop it where inappropriate. - typeset -l is only available in BASH 4 and higher. Use it conditionally only. - Use tr to convert strings to lowercase when using a BASH version lower than 4. --- bin/build-deb-package | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/bin/build-deb-package b/bin/build-deb-package index de63401..74887fa 100755 --- a/bin/build-deb-package +++ b/bin/build-deb-package @@ -262,7 +262,11 @@ build_packages() { } # for Ubuntu version is the codename of the distribution release - typeset -l codename="${l_CODENAME}" + if [ -n "${BASH_VERSINFO[0]}" ] && [ "${BASH_VERSINFO[0]}" -gt 3 ]; then + typeset -l codename="${l_CODENAME}" + else + typeset codename="$(tr '[:upper:]' '[:lower:]' <<< "${l_CODENAME}")" + fi # translate the version name for Debian releases [ "x${l_CODENAME}" = "xsid" ] && codename="unstable" @@ -270,9 +274,9 @@ build_packages() { #[ "x$l_CODENAME" = "xwheezy" ] && codename=stable #[ "x$l_CODENAME" = "xoldstable" ] && codename=oldstable - typeset -l numerical_version="" - typeset -l -i tmp_ret="1" - typeset -l pretty_dist="" + typeset numerical_version="" + typeset -i tmp_ret="1" + typeset pretty_dist="" if [ -n "${l_DIST}" ] && [ "${l_DIST}" = "debian" ]; then pretty_dist="Debian" @@ -286,7 +290,7 @@ build_packages() { tmp_ret="${?}" fi - if [ "${tmp_ret}" -ne "0" ]; then + if [ "${tmp_ret}" -ne "0" ] || [ -z "${numerical_version}" ]; then echo "Error: unable to map code name \"${codename}\" to Debian or Ubuntu numerical versions. Unknown code name or not applicable to distribution \"${pretty_dist}\"? Aborting." >&2 exit 1 fi -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git