]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
scripts: obs - require confirmation when not pushing to devel
authorTomas Krizek <tomas.krizek@nic.cz>
Tue, 27 Feb 2018 17:20:41 +0000 (18:20 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 27 Feb 2018 17:20:41 +0000 (18:20 +0100)
scripts/build-in-obs.sh

index b7409d2a0733d3194d7b1be83a849bb9807b4ca5..39f6e663168fed66bf0012e26005da8a06b274a1 100755 (executable)
@@ -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 * ||: