From 5b31c5d8b9d230e2da96f8fc0b0b9dd0b4e7f00a Mon Sep 17 00:00:00 2001 From: Christian Jung Date: Fri, 21 Sep 2018 13:40:49 +0200 Subject: [PATCH 1/2] check for APP_NAME before calling basename --- tools/create-project | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/create-project b/tools/create-project index e551925..2588a3d 100755 --- a/tools/create-project +++ b/tools/create-project @@ -1,10 +1,10 @@ #!/bin/env bash APP_PATH=$1 -APP_NAME=`basename $1` -THIS_DIR=$(dirname $(readlink -f $0)) if [[ "$APP_PATH" != "" ]]; then +APP_NAME=`basename $1` +THIS_DIR=$(dirname $(readlink -f $0)) mkdir $APP_PATH && \ cat > $APP_PATH/ansible.cfg << END From f22c02f82819e19be7df2797d88905c58ca19066 Mon Sep 17 00:00:00 2001 From: Christian Jung Date: Fri, 21 Sep 2018 13:55:01 +0200 Subject: [PATCH 2/2] also add the inventory file --- tools/create-project | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/create-project b/tools/create-project index 2588a3d..48e2b1b 100755 --- a/tools/create-project +++ b/tools/create-project @@ -10,6 +10,7 @@ mkdir $APP_PATH && \ cat > $APP_PATH/ansible.cfg << END # ansible.cfg [defaults] +inventory = inventory library = `readlink -f $THIS_DIR/../library` roles_path = `readlink -f $THIS_DIR/../roles` module_utils = `readlink -f $THIS_DIR/../module_utils`