diff options
author | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2016-04-07 22:45:23 +0300 |
---|---|---|
committer | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2016-04-07 22:45:23 +0300 |
commit | a9274b8a8b051ae5a0cc00a9d3d967be7202dcf0 (patch) | |
tree | e53c9307a0644924bcbec97a1219605e09895b3d | |
parent | c4263805fb8313e1a698876d31d37fbec25ce70c (diff) |
toolchain-tools: logiferr(): Pass args using "$@".
This allows to pass quoted args without them being hosed. Fixes dejagnu
mirroring.
Change-Id: I3307e85046a554015fe0938717894fcdd9bbe4c1
-rwxr-xr-x | toolchain-tools | 10 |
1 files 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 |