This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository buildscripts. from 4d6193c bin/build-{deb,rpm}-package: merge some other common changes from the nsis script. No functional difference. new 9be82e1 bin/common.sh: add shared file for common functions. new e740ba6 bin/build-{{deb,rpm}-package,nsis-package.sh}: source new common file. new df083c3 bin/build-{nsis-package.sh,rpm-package}: remove common code by stuff in common.sh. new 57dda5c bin/build-{deb-package,nsis-package.sh}: replace some more common logic regarding (dynamic) binary variables. The 4 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/build-nsis-package.sh | 16 ++++++++++---- bin/build-rpm-package | 36 ++++---------------------------- bin/common.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 77 insertions(+), 40 deletions(-) create mode 100644 bin/common.sh -- 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 9be82e1b31062cc82f44a38775b6f6b6b4c89ad0 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun May 10 05:32:16 2015 +0200 bin/common.sh: add shared file for common functions. --- bin/common.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/bin/common.sh b/bin/common.sh new file mode 100644 index 0000000..946ae58 --- /dev/null +++ b/bin/common.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# Copyright (C) 2015 by Mihai Moldovan <ionic@ionic.de> +# +# This programme is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This programme is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +export PATH="${HOME}/bin:${PATH}" + +function make_boolean () { + typeset -l OPTION="${1}" + + case "${OPTION}" in + ("0"|"no"|"false"|"") OPTION="0";; + (*) OPTION="1";; + esac + + printf "${OPTION}" + + return 0 +} + +# Repeats an input string. +# Returns the repeated input string. +repeat_str () { # INPUT COUNT + typeset INPUT="${1:?"Error: no input string passed to ${FUNCNAME}()."}" + typeset COUNT="${2:?"Error: no count passed to ${FUNCNAME}()."}" + + typeset ret="" + typeset -i i=0 + while [ "${i}" -lt "${COUNT}" ]; do + ret="${ret}$(printf "${INPUT}")" + i=$(($i + 1)) + done + + printf "${ret}" + + return 0 +} -- 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 e740ba64c279f3dbef8b17b6c8be30ab419a5d47 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun May 10 05:33:25 2015 +0200 bin/build-{{deb,rpm}-package,nsis-package.sh}: source new common file. --- bin/build-deb-package | 4 +++- bin/build-nsis-package.sh | 4 ++++ bin/build-rpm-package | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/build-deb-package b/bin/build-deb-package index d28abb7..2d0adef 100755 --- a/bin/build-deb-package +++ b/bin/build-deb-package @@ -18,7 +18,9 @@ # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. -export PATH="${HOME}/bin:${PATH}" +typeset script_path="$(basename "$(readlink -e "${BASH_SOURCE}")")" + +. "${script_path}/common.sh" GIT_USER="gituser" GIT_HOSTNAME="git.mydomain.org" diff --git a/bin/build-nsis-package.sh b/bin/build-nsis-package.sh index d74115f..abf3763 100755 --- a/bin/build-nsis-package.sh +++ b/bin/build-nsis-package.sh @@ -25,6 +25,10 @@ # It needs to be run under cygwin. # It also needs to be placed under /cygdrive/d/Build/buildscripts/bin/ +typeset script_path="$(basename "$(readlink -e "${BASH_SOURCE}")")" + +. "${script_path}/common.sh" + set -ex export PATH="${HOME}/bin:/cygdrive/d/Build/buildscripts/bin:${PATH}" diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 7b54e6a..fa2b445 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -18,6 +18,10 @@ # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +typeset script_path="$(basename "$(readlink -e "${BASH_SOURCE}")")" + +. "${script_path}/common.sh" + GIT_USER="gituser" GIT_HOSTNAME="git.mydomain.org" -- 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 df083c39f39edaf612512e17c9c3ec084ee85957 Author: Mihai Moldovan <ionic@ionic.de> Date: Sun May 10 05:34:23 2015 +0200 bin/build-{nsis-package.sh,rpm-package}: remove common code by stuff in common.sh. --- bin/build-nsis-package.sh | 2 +- bin/build-rpm-package | 32 -------------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/bin/build-nsis-package.sh b/bin/build-nsis-package.sh index abf3763..af2d5a1 100755 --- a/bin/build-nsis-package.sh +++ b/bin/build-nsis-package.sh @@ -31,7 +31,7 @@ typeset script_path="$(basename "$(readlink -e "${BASH_SOURCE}")")" set -ex -export PATH="${HOME}/bin:/cygdrive/d/Build/buildscripts/bin:${PATH}" +export PATH="/cygdrive/d/Build/buildscripts/bin:${PATH}" GIT_USER="x2go" GIT_HOSTNAME="code.x2go.org" diff --git a/bin/build-rpm-package b/bin/build-rpm-package index fa2b445..b2ed316 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -127,20 +127,6 @@ cleanup () { # Run cleanup() automatically. trap cleanup ERR EXIT SIGTERM SIGINT SIGHUP SIGPIPE SIGALRM SIGUSR1 SIGUSR2 -# FIXME: this should really be in a common.(sh) file! -function make_boolean () { - typeset -l OPTION="${1}" - - case "${OPTION}" in - ("0"|"no"|"false"|"") OPTION="0";; - (*) OPTION="1";; - esac - - printf "${OPTION}" - - return 0 -} - set_vars() { mkdir -p -- "${TEMP_BASE}" chmod 2770 "${TEMP_BASE}" @@ -249,24 +235,6 @@ check_mock_version_atleast () { fi } -# Repeats an input string. -# Returns the repeated input string. -repeat_str () { # INPUT COUNT - typeset INPUT="${1:?"Error: no input string passed to ${FUNCNAME}()."}" - typeset COUNT="${2:?"Error: no count passed to ${FUNCNAME}()."}" - - typeset ret="" - typeset -i i=0 - while [ "${i}" -lt "${COUNT}" ]; do - ret="${ret}$(printf "${INPUT}")" - i=$(($i + 1)) - done - - printf "${ret}" - - return 0 -} - # Creates a custom mock config file given a base config (taken from # /etc/mock/), the build component and the target specification ("full" or "base"). # Base refers to adding x2go-extras only, while full means also -- 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 57dda5c95d5f250f88baca32b1b2ad958d752cdb Author: Mihai Moldovan <ionic@ionic.de> Date: Sun May 10 05:51:51 2015 +0200 bin/build-{deb-package,nsis-package.sh}: replace some more common logic regarding (dynamic) binary variables. --- bin/build-deb-package | 10 +++++++--- bin/build-nsis-package.sh | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/bin/build-deb-package b/bin/build-deb-package index 2d0adef..9f8f151 100755 --- a/bin/build-deb-package +++ b/bin/build-deb-package @@ -403,9 +403,13 @@ delay_build() { ### MAIN ### set_vars "${@}" && { if [ "x$(basename "${0}")" = "x${PREFIX}-build-deb-package" ] || [ "x$(basename "${0}")" = "x${PREFIX}-build+upload-deb-package" ]; then - # Treat any value other than "no" and "0" as true. - cd "${PROJECT_DIR}" && pkgneedsbuild "${CHECKOUT}" || ( [ "x${FORCE_BUILD}" != "xno" ] && [ "x${FORCE_BUILD}" != "x0" ] ) && { - if [ "x${FORCE_BUILD}" != "xno" ] && [ "x${FORCE_BUILD}" != "x0" ] && ( [ "x${NO_DELAY}" = "xno" ] || [ "x${NO_DELAY}" = "x0" ] ); then + FORCE_BUILD="$(make_boolean "${FORCE_BUILD}")" + NO_DELAY="$(make_boolean "${NO_DELAY}")" + + cd "${PROJECT_DIR}" && { + pkgneedsbuild "${CHECKOUT}" || [ "${FORCE_BUILD}" -eq "1" ] + } && { + if [ "${FORCE_BUILD}" -eq "1" ] && [ "${NO_DELAY}" -eq "0" ]; then delay_build fi lock_workspace diff --git a/bin/build-nsis-package.sh b/bin/build-nsis-package.sh index af2d5a1..5c99ed3 100755 --- a/bin/build-nsis-package.sh +++ b/bin/build-nsis-package.sh @@ -298,9 +298,13 @@ delay_build() { ### MAIN ### set_vars "${@}" && { if [ "x$(basename "${0}")" = "xbuild-nsis-package.sh" ] || [ "x$(basename ${0})" = "xbuild+upload-nsis-package.sh" ]; then - # Treat any value other than "no" and "0" as true. - cd "${PROJECT_DIR}" && pkgneedsbuild "${CHECKOUT}" || ( [ "x${FORCE_BUILD}" != "xno" ] && [ "x${FORCE_BUILD}" != "x0" ] ) && { - if [ "x${FORCE_BUILD}" != "xno" ] && [ "x${FORCE_BUILD}" != "x0" ] && ( [ "x${NO_DELAY}" = "xno" ] || [ "x${NO_DELAY}" = "x0" ] ); then + FORCE_BUILD="$(make_boolean "${FORCE_BUILD}")" + NO_DELAY="$(make_boolean "${NO_DELAY}")" + + cd "${PROJECT_DIR}" && { + pkgneedsbuild "${CHECKOUT}" || [ "${FORCE_BUILD}" -eq "1" ] + } && { + if [ "${FORCE_BUILD}" -eq "1" ] && [ "${NO_DELAY}" -eq "0" ]; then delay_build fi lock_workspace -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git