From d7c026fe7ddd8eac8fe9b9278c281a3194b59a9e Mon Sep 17 00:00:00 2001 From: Christian Nikkanen Date: Thu, 9 Nov 2017 11:20:11 +0200 Subject: [PATCH] Prevent running installer.sh directly --- customizations/installer.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/customizations/installer.sh b/customizations/installer.sh index ce58b64..f1acf13 100644 --- a/customizations/installer.sh +++ b/customizations/installer.sh @@ -1,5 +1,13 @@ #!/usr/bin/env bash +cwd=$(pwd) + +if [[ $cwd == *"customizations"* ]]; then + echo "You're doing it wrong. You should run install.sh from project root, and nothing from customizations folder." + exit 1 +fi + + source customizations/helpers.sh source customizations/theme-installer.sh