feat: initial commit
This commit is contained in:
commit
a2f0c761a6
24
README.md
Normal file
24
README.md
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Make Tools
|
||||||
|
|
||||||
|
Tâches [Make]() génériques à utiliser de projet en projet.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Utilisation
|
||||||
|
|
||||||
|
1. Créer un fichier `Makefile` à la racine de votre projet:
|
||||||
|
|
||||||
|
```
|
||||||
|
.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
17
inc/webdav.mk
Normal 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
15
install.sh
Normal 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
BIN
misc/share_all.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
Loading…
x
Reference in New Issue
Block a user