fix(install): correctly inject tools dir into gitignore
This commit is contained in:
parent
541afcccfe
commit
6028362078
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue