From 9197de052f490980f84f4c0eb7a0a7410ff22810 Mon Sep 17 00:00:00 2001 From: RandumKiwi Date: Thu, 6 Feb 2014 09:04:27 +1300 Subject: [PATCH] Fix BASH vs KSH conflicts, by forcing user to use BASH. --- config/convert_mapconfig.sh | 6 ++++++ source/package_assaultcube.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config/convert_mapconfig.sh b/config/convert_mapconfig.sh index 6e0dce3a..2a706cd6 100644 --- a/config/convert_mapconfig.sh +++ b/config/convert_mapconfig.sh @@ -2,6 +2,12 @@ # A simple script using SED to make map configs # compatible with the new layout. +# KSH causes conflicts, allow BASH only: +if [ -z "$(echo "$BASH")" ]; then + echo "FAILURE: Please run this script with BASH, not SH/KSH/ZSH, etc" + exit +fi + # HELP file: if [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "" ]; then echo "Usage: "$0" MAP_CONFIG_FILE(S)" diff --git a/source/package_assaultcube.sh b/source/package_assaultcube.sh index 9979f173..e4c3e981 100644 --- a/source/package_assaultcube.sh +++ b/source/package_assaultcube.sh @@ -20,7 +20,7 @@ ABSOLUTEPATHTODOCS=~/AssaultCube/GIT_Website/htdocs/docs NEWACVERSION=1.2.0.2 # KSH won't work, as this script uses echo throughout it, echo's options are shell-specific: -if [ -z "$(echo -e "$BASH")" ]; then +if [ -z "$(echo "$BASH")" ]; then echo "FAILURE: Please run this script with BASH, not SH/KSH/ZSH, etc" exit fi