25 lines
510 B
Bash
25 lines
510 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
TASKS_DIR=.mktools
|
||
|
TASKS_FILES="webdav"
|
||
|
|
||
|
main() {
|
||
|
# Create $TASKS_DIR
|
||
|
mkdir -p "$TASKS_DIR"
|
||
|
|
||
|
# Download each referenced task files in $TASKS_DIR
|
||
|
for f in $TASKS_FILES; do
|
||
|
curl -o "$TASKS_DIR/$f.mk" "https://forge.cadoles.com/Cadoles/make-tools/raw/branch/master/tasks/$f.mk"
|
||
|
done
|
||
|
|
||
|
# Ignore $TASKS_DIR
|
||
|
|
||
|
if [ -f .gitignore ]; then
|
||
|
touch .gitignore
|
||
|
fi
|
||
|
grep -qF -- "$TASKS_DIR/" ".gitignore" || echo "$TASKS_DIR/" >> ".gitignore"
|
||
|
}
|
||
|
|
||
|
main
|