build: skip confirm if non-interactive

This commit is contained in:
Unai Martinez-Corral 2023-04-09 01:29:19 +01:00
parent 06cc72f615
commit 9afdb20dc5
1 changed files with 13 additions and 11 deletions

View File

@ -29,17 +29,19 @@ img_version=$godot_branch-$base_distro
files_root="$(cd dirname "$0"; pwd)/files"
build_msvc=0
# Confirm settings
echo "Docker image tag: ${img_version}"
echo
while true; do
read -p "Is this correct? [y/n] " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit 1;;
* ) echo "Please answer yes or no.";;
esac
done
if [ ! -z "$PS1" ]; then
# Confirm settings
echo "Docker image tag: ${img_version}"
echo
while true; do
read -p "Is this correct? [y/n] " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit 1;;
* ) echo "Please answer yes or no.";;
esac
done
fi
mkdir -p logs