Skip to content

Commit

Permalink
Add a timer to rebuild script
Browse files Browse the repository at this point in the history
  • Loading branch information
roceb committed Aug 9, 2024
1 parent b47701a commit a12636a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
9 changes: 0 additions & 9 deletions bin/envconfig
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,6 @@ if [ "$finish" = true ]; then
return
fi

if [[ -n $BASH_VERSION ]]; then
LSSTSW=$(cd "$(dirname "${BASH_SOURCE[0]}")/.."; pwd) || return 1
SUFFIX='sh'
else
LSSTSW=$(cd "$(dirname "$0")/.."; pwd) || return 1
# shellcheck disable=SC2034
SUFFIX='zsh'
fi

# shellcheck source=./etc/settings.cfg.sh
source "${LSSTSW}/etc/settings.cfg.sh"

Expand Down
6 changes: 4 additions & 2 deletions bin/rebuild
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

set -e

timer_start=$(date +%s)
DIR=$(cd "$(dirname "$0")"; pwd)
# shellcheck source=./etc/settings.cfg.sh
. "${DIR}/../etc/settings.cfg.sh"
Expand Down Expand Up @@ -217,8 +218,9 @@ fi
if [[ -n $TAG ]]; then
eups tags --clone="$BUILD" "$TAG"
fi

echo "# BUILD $BUILD completed."
timer_end=$(date +%s)
RUNTIME=$((timer_end-timer_start))
echo "# BUILD $BUILD completed in $RUNTIME seconds."
) 200>"$DIR/../var/run/rebuild.run"

# vim: tabstop=2 shiftwidth=2 expandtab

0 comments on commit a12636a

Please sign in to comment.