fix(install): correctly inject tools dir into gitignore
Some checks reported errors
Cadoles/mktools/pipeline/head Something is wrong with the build of this commit
Some checks reported errors
Cadoles/mktools/pipeline/head Something is wrong with the build of this commit
This commit is contained in:
parent
541afcccfe
commit
dd31e0acd6
@ -3,7 +3,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
TASKS_DIR=".mktools"
|
TASKS_DIR=".mktools"
|
||||||
TASKS_FILES="webdav gitea changelog version checkmake"
|
TASKS="${TASKS:-webdav gitea changelog version checkmake}"
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
echo "Creating directory '$TASKS_DIR/'"
|
echo "Creating directory '$TASKS_DIR/'"
|
||||||
@ -11,7 +11,7 @@ main() {
|
|||||||
mkdir -p "$TASKS_DIR"
|
mkdir -p "$TASKS_DIR"
|
||||||
|
|
||||||
# Download each referenced task files in $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'"
|
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"
|
curl -qo "$TASKS_DIR/$f.mk" "https://forge.cadoles.com/Cadoles/mktools/raw/branch/master/tasks/$f.mk"
|
||||||
done
|
done
|
||||||
@ -20,7 +20,7 @@ main() {
|
|||||||
if [ ! -f .gitignore ]; then
|
if [ ! -f .gitignore ]; then
|
||||||
touch .gitignore
|
touch .gitignore
|
||||||
fi
|
fi
|
||||||
grep -qF -- "$TASKS_DIR/" ".gitignore" || echo "$TASKS_DIR/" >> ".gitignore"
|
grep -qF -- "$TASKS_DIR/" ".gitignore" || echo "\n$TASKS_DIR/" >> ".gitignore"
|
||||||
|
|
||||||
echo "Done"
|
echo "Done"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user