change -eq 1 to -ne 0

To accept non-zero value
This commit is contained in:
Suikan 2021-07-03 08:19:00 +09:00
parent dc1e8ff720
commit b7738a9fd8
4 changed files with 10 additions and 10 deletions

View file

@ -6,7 +6,7 @@
function confirmation_common(){
# Consistency check for the OVERWRITEINSTALL and ERASEALL
if [ "${ERASEALL}" -eq 1 ] && [ "${OVERWRITEINSTALL}" -eq 1 ] ; then
if [ "${ERASEALL}" -ne 0 ] && [ "${OVERWRITEINSTALL}" -ne 0 ] ; then
cat <<- HEREDOC
***** ERROR : Confliction between ERASEALL and OVERWRITEINSTALL *****
...ERASEALL = ${ERASEALL}
@ -71,7 +71,7 @@ function confirmation_common(){
fi # if YES
# For sure ask to be sure to erase.
if [ "${ERASEALL}" -eq 1 ] ; then
if [ "${ERASEALL}" -ne 0 ] ; then
echo "Are you sure you want to erase entire ${DEV}? [Y/N]"
read -r YESNO
if [ "${YESNO}" != "Y" ] && [ "${YESNO}" != "y" ] ; then