From 222ca2c853e0959048dd0eb6da0d649ff41c7d86 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sat, 30 Jan 2016 20:18:06 +0100 Subject: Fail if the script is not run in an extension's root dir --- add_extbase_property.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/add_extbase_property.sh b/add_extbase_property.sh index 6defd19..a38eda8 100755 --- a/add_extbase_property.sh +++ b/add_extbase_property.sh @@ -5,6 +5,11 @@ # TODO: @required support # TODO: add relation with optional @lazy support +if [ ! -e "ext_emconf.php" ]; then + echo "Error: This script needs to be run from an extensions root dir" + exit 1 +fi + model=$1 property=$2 typ=$3 -- cgit