diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-16 16:15:40 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-16 16:15:40 +0200 |
commit | 025cf71eddd104954ffe412d8c5f7e3cabbf8c8a (patch) | |
tree | 1c72450ce22a8d8e34d647be1004b786f517c4ab | |
parent | 099279d430b71645492bda926b9ab1e32790a311 (diff) |
Add option to skip checks in dist script
-rwxr-xr-x | dist | 36 |
1 files changed, 24 insertions, 12 deletions
@@ -2,12 +2,15 @@ # Prepare build2 distribution. # -# Usage: dist [-t] +# Usage: dist [-t] [-s] # # -t # Toolchain only. # -usage="usage: $0 [-t]" +# -s +# Skip checks. +# +usage="usage: $0 [-t] [-s]" owd=`pwd` trap "{ cd $owd; exit 1; }" ERR @@ -19,12 +22,18 @@ function error () { info "$*"; exit 1; } toolchain="libbutl build2 libbpkg bpkg" extras="brep" +skip=n + while [ $# -gt 0 ]; do case $1 in -t) extras= shift ;; + -s) + skip=y + shift + ;; *) error "unexpected $1" ;; @@ -39,17 +48,20 @@ if [ -z "$v" ]; then error "unable to extract version from `cat build2-toolchain/version`" fi -# Check that everything is committed and pushed. -# -info "checking repositories..." -for t in $tools build2-toolchain; do - git/check --master --clean --synced --submodule $t -done +if [ "$skip" != "y" ]; then -# Update the development build since we use it to dist/package. -# -info "making sure everythings is up to date..." -b build2/ bpkg/ + # Check that everything is committed and pushed. + # + info "checking repositories..." + for t in $tools build2-toolchain; do + git/check --master --clean --synced --submodule $t + done + + # Update the development build since we use it to dist/package. + # + info "making sure everythings is up to date..." + b build2/ bpkg/ +fi # # |