feat: initial commit

This commit is contained in:
wpetit 2023-08-21 19:08:40 -06:00
commit 09ef666ed0
4 changed files with 56 additions and 0 deletions

24
README.md Normal file
View File

@ -0,0 +1,24 @@
# Make Tools
Tâches [Make]() génériques à utiliser de projet en projet.
![](./misc/share_all.png)
## Utilisation
1. Créer un fichier `Makefile` à la racine de votre projet:
```makefile
.inc:
curl -q https://forge.cadoles.com/Cadoles/make-tools/install.sh | $(SHELL)
-include .inc/*.mk
```
2. Ajouter le répertoire `.inc` dans les fichiers ignorés par Git
```
echo '.inc/' >> .gitignore
```
3. Vous pouvez commencer à utiliser les tâches Make partagées !

17
inc/webdav.mk Normal file
View File

@ -0,0 +1,17 @@
WEBDAV_USER ?=
WEBDAV_PASSWD ?=
WEBDAV_REMOTE_URL ?=
WEBDAV_DIR ?=
WEBDAV_FILE ?=
webdav-upload:
curl \
-u '$(WEBDAV_USER):$(WEBDAV_PASSWD)' \
-X MKCOL \
"$(WEBDAV_REMOTE_URL)/$(WEBDAV_DIR)"
curl \
-u '$(WEBDAV_USER):$(WEBDAV_PASSWD)' \
-T "$(PWD)/$(WEBDAV_FILE)" \
"$(WEBDAV_REMOTE_URL)/$(WEBDAV_DIR)/$(shell basename $(WEBDAV_FILE))"
.PHONY: webdav-upload

15
install.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
set -e
INC_DIR=.inc
INC_FILES="webdav "
main() {
mkdir -p "$INC_DIR"
for f in $INC_FILES; do
curl -o "$INC_DIR/$f.mk" https://forge.cadoles.com/Cadoles/make-tools
done
}
main

BIN
misc/share_all.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB