diff options
author | 2010-10-25 03:35:48 +0200 | |
---|---|---|
committer | 2010-10-25 03:35:48 +0200 | |
commit | aee73148ff4977a2f6359f0e3edd0e9c396239be (patch) | |
tree | 76d035f2eb0a60461b6a91a993c7736c61c45542 | |
parent | Consider fetching failed if there is an error condition. (diff) | |
download | flameeyes-tinderbox-aee73148ff4977a2f6359f0e3edd0e9c396239be.tar.gz flameeyes-tinderbox-aee73148ff4977a2f6359f0e3edd0e9c396239be.tar.bz2 flameeyes-tinderbox-aee73148ff4977a2f6359f0e3edd0e9c396239be.zip |
Use the same dent_me function as the other tinderbox scripts.
This also makes sure that no errors are thrown around if bti is missing.
-rwxr-xr-x | tinderbox-restart.sh | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/tinderbox-restart.sh b/tinderbox-restart.sh index 6281246..a7016e3 100755 --- a/tinderbox-restart.sh +++ b/tinderbox-restart.sh @@ -23,15 +23,19 @@ reset_emergelog() { rm -f /var/log/emerge.log } -dent() { - # Ignore failure that might be caused by network being - # unavailable, the service being unavailable or things like those. - echo "$@" | bti --background || true -} +source /etc/make.tinderbox.private.conf + +if [[ -n ${BTI_ACCOUNT} ]]; then + dent_me() { + echo "$@" | bti ${TINDERBOX_PROXY:+--proxy "${TINDERBOX_PROXY}"} --host "${BTI_HOST}" --account "${BTI_ACCOUNT}" --password "${BTI_PASSWORD}" --background + } +else + dent_me() { :; } +fi set -e -dent "#syncing anew upon request" +dent_me "#syncing anew upon request" emerge --sync @@ -54,7 +58,7 @@ reset_emergelog if emerge -u1 perl-cleaner perl && fgrep -q '>>> emerge' /var/log/emerge.log; then - dent "running per-cleaner" + dent_me "running per-cleaner" perl-cleaner --all -- --keep-going fi @@ -63,7 +67,7 @@ reset_emergelog if emerge -u1 ghc haskell-updater && fgrep -q '>>> emerge' /var/log/emerge.log; then - dent "running #haskell-updater" + dent_me "running #haskell-updater" /usr/sbin/haskell-updater --upgrade fi @@ -72,7 +76,7 @@ reset_emergelog if emerge -u1 dev-lang/ocaml && fgrep -q '>>> emerge' /var/log/emerge.log; then - dent "running #ocaml-rebuild" + dent_me "running #ocaml-rebuild" # Don't fail if ocaml-rebuild fails, because of bug #319553 /usr/sbin/ocaml-rebuild.sh -f || true fi @@ -84,7 +88,7 @@ cp /usr/src/linux/.config /usr/src/config if emerge -u1 sys-kernel/gentoo-sources && fgrep -q '>>> emerge' /var/log/emerge.log; then - dent "new #gentoo-sources, making oldconfig" + dent_me "new #gentoo-sources, making oldconfig" cp /usr/src/config /usr/src/linux/.config pushd /usr/src/linux |