diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-12-08 18:49:56 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-12-08 18:57:08 +0100 |
commit | b6a94b6002ab66f2125d25c2c890df903c0c53b8 (patch) | |
tree | 75f27da53aa0ba4b126873057f1fbd2ab0f43acc /bin | |
parent | af0e9dce759d65e27832e916523ac4ccd520f4b7 (diff) |
Run actions under "set -x"
cowbuilder is currently very terse about certain errors so run the
action under "set -x" to print the exact command invocation.
This will also help to diagnose sudo issues, etc.
Since the script runs with '-e' we can safely change the "exit $?"
to "exit 0".
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/git-pbuilder | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/git-pbuilder b/bin/git-pbuilder index a9984562..f3112afd 100755 --- a/bin/git-pbuilder +++ b/bin/git-pbuilder @@ -267,22 +267,27 @@ EOE # Run the builder. if [ no = "$GIT_PBUILDER_AUTOCONF" ] ; then + set -x sudo "$BUILDER" "$action" "${OPTIONS[@]}" "$@" else if [ "$EXT" = '-backports' ] ; then OTHERMIRROR="deb $BACKPORTS $DIST$EXT main" + set -x sudo "$BUILDER" "$action" --distribution "$DIST" \ --othermirror "$OTHERMIRROR" "${OPTIONS[@]}" "$@" elif [ "$EXT" = '-lts' ] ; then OTHERMIRROR="deb $LTS $DIST$EXT main" + set -x sudo "$BUILDER" "$action" --distribution "$DIST" \ --othermirror "$OTHERMIRROR" "${OPTIONS[@]}" "$@" else + set -x sudo "$BUILDER" "$action" --distribution "$DIST" \ "${OPTIONS[@]}" "$@" fi fi - exit $? + { set +x; } 2>/dev/null + exit 0 fi # Build package: not (update | create | login) |