Ajout du script pour lancer des commandes

This commit is contained in:
Simon 2020-05-07 22:28:00 +02:00
parent 8d0bfbddd0
commit 552353d895
2 changed files with 31 additions and 0 deletions

View File

@ -3,3 +3,9 @@
## Technologie
- Hugo: pour générer le site statique
## Commande
Voici les commandes :
- `./run dev` : Lance hugo pour le développement avec l'autoreload

25
run Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
# -e Exit immediately if a command exits with a non-zero status.
# -u Treat unset variables as an error when substituting.
set -eu
START=`date +%s`
echo
echo "┌┐░░░░░░┌──┐░░┌┐░┌┬─┬┐░┌┐░"
echo "││┌─┬┬┬┐└┐┌┴┬─┤└┐││││├─┤└┐"
echo "│└┤┼││││░││┴┤─┤│││││││┴┤┼│"
echo "└─┴─┴──┘░└┴─┴─┴┴┘└─┴─┴─┴─┘"
echo
if [ $# -ge 1 ] && [ $1 == "dev" ]; then
hugo server -D
else
echo "Commands:"
echo "- ./run dev: Start development"
echo
fi
END=`date +%s`
echo "✨ Done in $((END-START))s"