From a9274b8a8b051ae5a0cc00a9d3d967be7202dcf0 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 7 Apr 2016 22:45:23 +0300 Subject: toolchain-tools: logiferr(): Pass args using "$@". This allows to pass quoted args without them being hosed. Fixes dejagnu mirroring. Change-Id: I3307e85046a554015fe0938717894fcdd9bbe4c1 --- toolchain-tools | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/toolchain-tools b/toolchain-tools index 6a92ee3..31dc352 100755 --- a/toolchain-tools +++ b/toolchain-tools @@ -31,11 +31,11 @@ function errcho() { } function logiferr() { - LOG=$($1 2>&1) + LOG=$("$@" 2>&1) STATUS=$? if [ ${STATUS} != 0 ] then - errcho "CMD: '$1' exited with status ${STATUS}" + errcho "CMD: '$@' exited with status ${STATUS}" if [ "${LOG}" != "" ] then errcho "WITH LOG OUTPUT: ${LOG}" @@ -94,7 +94,7 @@ function update_dejagnu_mirror() { stubborn_do git remote update if [ $? == 0 ] then - logiferr "$GITOLITE_BIN push --force origin 'refs/heads/*' 'refs/tags/*'" + logiferr $GITOLITE_BIN push --force origin 'refs/heads/*' 'refs/tags/*' fi } @@ -107,6 +107,6 @@ $@ all_repos="gcc.git glibc.git dejagnu.git newlib.git binutils-gdb.git" cd /srv/repositories for repo in $all_repos ; do - logiferr "/usr/local/bin/grok-manifest -m /var/www/git.linaro.org/manifest.js.gz -t /srv/repositories/ -v -n toolchain/$repo" - logiferr "git --git-dir=$TOOLCHAIN_DIR/$repo update-server-info" + logiferr /usr/local/bin/grok-manifest -m /var/www/git.linaro.org/manifest.js.gz -t /srv/repositories/ -v -n toolchain/$repo + logiferr git --git-dir=$TOOLCHAIN_DIR/$repo update-server-info done -- cgit v1.2.3