Check for bash version 4+

This commit is contained in:
Shourai 2018-03-11 15:43:25 +01:00
parent d5993cde6f
commit e8d9202e3d
1 changed files with 7 additions and 0 deletions

View File

@ -110,6 +110,13 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
echo -e "\n\n" echo -e "\n\n"
if [[ $REPLY =~ ^[Yy]$ ]]; then if [[ $REPLY =~ ^[Yy]$ ]]; then
# Check for bash version 4 or higher
if [ $(bash -c 'echo ${BASH_VERSINFO[0]}') -lt 4 ]; then
echo "Please install bash version 4 or higher."
exit 1
fi
# backup current internal_UUIDs.txt file # backup current internal_UUIDs.txt file
if [ -s ./ShadowFox_customization/internal_UUIDs.txt ]; then if [ -s ./ShadowFox_customization/internal_UUIDs.txt ]; then
bakfile="internal_UUIDs.backup.$(date +"%Y-%m-%d_%H%M%S")" bakfile="internal_UUIDs.backup.$(date +"%Y-%m-%d_%H%M%S")"