From: Tomas Krizek Date: Tue, 27 Feb 2018 17:20:41 +0000 (+0100) Subject: scripts: obs - require confirmation when not pushing to devel X-Git-Tag: v2.2.0~16^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef0b97dceaf91b752af15f6e465a4ff4d6397bcc;p=thirdparty%2Fknot-resolver.git scripts: obs - require confirmation when not pushing to devel --- diff --git a/scripts/build-in-obs.sh b/scripts/build-in-obs.sh index b7409d2a0..39f6e6631 100755 --- a/scripts/build-in-obs.sh +++ b/scripts/build-in-obs.sh @@ -8,6 +8,14 @@ project=home:CZ-NIC:$1 package=knot-resolver +if ! [[ "$1" == *-devel ]]; then + read -p "Pushing to '$project', are you sure? [y/N]: " yn + case $yn in + [Yy]* ) break;; + * ) exit 1; break;; + esac +fi + osc co "${project}" "${package}" pushd "${project}/${package}" osc del * ||: