aboutsummaryrefslogtreecommitdiffstats
path: root/build-openbsd-image.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build-openbsd-image.sh')
-rwxr-xr-xbuild-openbsd-image.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/build-openbsd-image.sh b/build-openbsd-image.sh
index 17f2145..faa6bc1 100755
--- a/build-openbsd-image.sh
+++ b/build-openbsd-image.sh
@@ -18,6 +18,20 @@ export PACKER_LOG=1
main() (
parse_args "$@"
cd openbsd-image/
+ if [ -d build/ ]; then
+ printf 'Build directory exists. Must delete before re-building. Proceed? (y/N)'
+ read -r answer
+ case $answer in
+ [yY])
+ echo "Removing build/.."
+ rm -r build/
+ ;;
+ *)
+ echo "Aborting.."
+ exit 0
+ ;;
+ esac
+ fi
packer init .
packer build \
-only "qemu.openbsd-$ARCH" \