From 60283620786b27d0b7d051122b91e46d274ac039 Mon Sep 17 00:00:00 2001 From: William Petit Date: Wed, 15 Nov 2023 11:10:36 +0100 Subject: [PATCH] fix(install): correctly inject tools dir into gitignore --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index e5495b1..50a8a52 100644 --- a/install.sh +++ b/install.sh @@ -3,7 +3,7 @@ set -e TASKS_DIR=".mktools" -TASKS_FILES="webdav gitea changelog version checkmake" +TASKS="${TASKS:-webdav gitea changelog version checkmake}" main() { echo "Creating directory '$TASKS_DIR/'" @@ -11,7 +11,7 @@ main() { mkdir -p "$TASKS_DIR" # Download each referenced task files in $TASKS_DIR - for f in $TASKS_FILES; do + for f in $TASKS; do echo "Downloading file '$TASKS_DIR/$f.mk'" curl -qo "$TASKS_DIR/$f.mk" "https://forge.cadoles.com/Cadoles/mktools/raw/branch/master/tasks/$f.mk" done @@ -20,7 +20,7 @@ main() { if [ ! -f .gitignore ]; then touch .gitignore fi - grep -qF -- "$TASKS_DIR/" ".gitignore" || echo "$TASKS_DIR/" >> ".gitignore" + grep -qFx -- "$TASKS_DIR/" .gitignore || echo -e "$TASKS_DIR/" >> .gitignore echo "Done" }