diff options
| author | 2013-03-02 00:36:12 +0100 | |
|---|---|---|
| committer | 2013-03-02 00:36:12 +0100 | |
| commit | cae1efd552ed0618b13120e07c346cbe28cbd00a (patch) | |
| tree | 173a36c7c889c45d1590f0942e5a776c65e84db0 /build.sh | |
| parent | 2232b03bb48a012d8d3902dd32c7612dc112e0f9 (diff) | |
Corrections quelques bugs + modif fichier config BDD + ajout fichier build.sh pour générer la lib Minz
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/build.sh b/build.sh new file mode 100755 index 000000000..e6c563b83 --- /dev/null +++ b/build.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +MINZ_REPO_URL="https://github.com/marienfressinaud/MINZ.git" +MINZ_CLONE_PATH="./minz_tmp" +LIB_MINZ_PATH="./minz_tmp/lib/*" +LIB_PATH="./lib/minz" +LOG_PATH="./log" +CACHE_PATH="./cache" + +git_check() { + printf "Vérification de la présence de git... " + + EXE_PATH=$(which "git" 2>/dev/null) + if [ $? -ne 0 ]; then + printf "git n'est pas présent sur votre système. Veuillez l'installer avant de continuer\n"; + exit 1 + else + printf "git a été trouvé\n" + fi +} + +dir_check() { + test -d $LOG_PATH + if [ $? -ne 0 ]; then + mkdir $LOG_PATH + fi + + test -d $CACHE_PATH + if [ $? -ne 0 ]; then + mkdir $CACHE_PATH + fi +} + +clone_minz() { + printf "Récupération de Minz...\n" + + git clone $MINZ_REPO_URL $MINZ_CLONE_PATH + test -d $LIB_PATH + if [ $? -ne 0 ]; then + mkdir -p $LIB_PATH + fi + mv $LIB_MINZ_PATH $LIB_PATH + rm -rf $MINZ_CLONE_PATH + + printf "Récupération de Minz terminée...\n" +} + +git_check +dir_check +clone_minz |
