From b9dc5ca4db068dc18c70158914073260d0b0fbd2 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Fri, 24 Feb 2017 17:50:02 +0000 Subject: [PATCH] pkg.sh: Fix build errors in gaflib projects Fix build errors in gaflib projects. This might kill some functionality, not sure. Signed-off-by: Jan Lindemann --- scripts/pkg.sh | 19 ++++++++++++++++--- scripts/timed-make-shell.sh | 5 +++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/scripts/pkg.sh b/scripts/pkg.sh index 1c87fcc9..63e1b8da 100644 --- a/scripts/pkg.sh +++ b/scripts/pkg.sh @@ -274,13 +274,26 @@ check_release_is_current() check_update_version() { + local comment="Started version" + set -- `getopt 'c:' "$@"` + while [ "$1" != -- ] ; do + case "$1" in + -c) + comment="$2" + shift + esac + shift + done + shift + ( cd $TOPDIR local v=`read_map VERSION` local next=`check_next_version` + [ "$next" ] || fatal "Failed to get next version." if [ "$next" != "$v" ]; then echo "$next-dev" > VERSION - scm_commit -m "Started version: $next" VERSION + scm_commit -m "$comment: $next" VERSION return 0 fi return 1 @@ -998,7 +1011,7 @@ need-release) fi ;; update-version) - check_update_version || exit 0 + eval check_update_version "@" || exit 0 ;; version) eval cmd_version "$@" @@ -1009,7 +1022,7 @@ build) cmd_build ;; release-reinstall) - check_update_version + check_update_version -c "Started version" cmd_build cmd_upload ;; diff --git a/scripts/timed-make-shell.sh b/scripts/timed-make-shell.sh index f890c9e6..653b7ce7 100644 --- a/scripts/timed-make-shell.sh +++ b/scripts/timed-make-shell.sh @@ -1,6 +1,7 @@ #!/bin/bash shift # get rid of the '-c' supplied by make. -echo running "$*" >>/tmp/make-cmds.log -time /bin/bash -c "$*" +log=/tmp/make-cmds.log +echo running "$*" >> $log +time /bin/bash -c "$*" 2>&1 | tee -a $log