2020-10-07 22:45:39 +00:00
|
|
|
# GRAVITY SYNC BY VMSTAN #####################
|
|
|
|
# gs-intent.sh ###############################
|
|
|
|
|
|
|
|
# For documentation or downloading updates visit https://github.com/vmstan/gravity-sync
|
|
|
|
# This code is called from the main gravity-sync.sh file and should not execute directly!
|
|
|
|
|
|
|
|
## Validate Intent
|
|
|
|
function intent_validate {
|
2020-12-31 02:45:47 +00:00
|
|
|
if [ "$VERIFY_PASS" == "0" ]
|
|
|
|
then
|
|
|
|
PHASER=$((( RANDOM % 4 ) + 1 ))
|
|
|
|
if [ "$PHASER" = "1" ]
|
|
|
|
then
|
|
|
|
INTENT="FIRE PHOTON TORPEDOS"
|
|
|
|
elif [ "$PHASER" = "2" ]
|
|
|
|
then
|
|
|
|
INTENT="FIRE ALL PHASERS"
|
|
|
|
elif [ "$PHASER" = "3" ]
|
|
|
|
then
|
|
|
|
INTENT="EJECT THE WARPCORE"
|
|
|
|
elif [ "$PHASER" = "4" ]
|
|
|
|
then
|
|
|
|
INTENT="ENGAGE TRACTOR BEAM"
|
|
|
|
fi
|
|
|
|
|
|
|
|
MESSAGE="Type ${INTENT} to Confirm"
|
|
|
|
echo_need
|
2020-12-31 02:49:54 +00:00
|
|
|
|
2020-12-31 02:45:47 +00:00
|
|
|
read INPUT_INTENT
|
2020-12-31 02:49:54 +00:00
|
|
|
|
2020-12-31 02:45:47 +00:00
|
|
|
if [ "${INPUT_INTENT}" != "${INTENT}" ]
|
|
|
|
then
|
|
|
|
MESSAGE="${TASKTYPE} Aborted"
|
|
|
|
echo_info
|
|
|
|
exit_nochange
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
MESSAGE="Verification Bypassed"
|
|
|
|
echo_warn
|
|
|
|
fi
|
2020-10-07 22:45:39 +00:00
|
|
|
}
|