From 025cf71eddd104954ffe412d8c5f7e3cabbf8c8a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 16 Aug 2016 16:15:40 +0200 Subject: Add option to skip checks in dist script --- dist | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) (limited to 'dist') diff --git a/dist b/dist index 56e24da..daea9ac 100755 --- a/dist +++ b/dist @@ -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 # # -- cgit v1.1