erplibre/script/terminal/validate_to_continue.sh
Mathieu Benoit cbc43fde3c [IMP] todo support odoo upgrade
- add example odoo test
- prevent delete production file with validation
- add makefile with selenium
- script prod to dev uninstall module after installation
- adapt todo with private directory
- script to download remote database
- TODO show documentation for migration
2025-10-31 01:43:26 -04:00

27 lines
448 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
if [[ $# -lt 1 ]]; then
echo "Usage: $0 \"Warning message to display\"" >&2
exit 2
fi
msg="$1"
# Require an interactive terminal
if [[ ! -t 0 || ! -t 1 ]]; then
echo "Interactive confirmation not possible (no TTY). Aborting." >&2
exit 130
fi
echo "$msg"
printf "Proceed? [y/N] "
# shellcheck disable=SC2162
read -r ans
if [[ "$ans" =~ ^[yY]$ ]]; then
exit 0
else
echo "Aborted."
exit 130
fi