Parcourir la source

utilisation du fichier de conf

Sniperovitch il y a 8 ans
Parent
commit
3f8d3e7bcb
1 fichiers modifiés avec 8 ajouts et 10 suppressions
  1. 8 10
      cocktail

+ 8 - 10
cocktail

@@ -1,16 +1,7 @@
 #!/bin/bash
 
-VERBOSE=1
-DEBUG=1
-
-PANDOC_FILTER_BASE=/home/sniperovitch/exegetesDoc/filters
-PANDOC_INCLUDE_BASE=/home/sniperovitch/exegetesDoc/pandocincludes
-WORKING_FOLDER=/home/sniperovitch/tmp
-
-STORE=/tmp/exegetes
-
 # exemple
-# ./cocktail.sh -d MonDossier -p Abro2 -b 'https://pad.exegetes.eu.org/p/g.DSXI1kGFT1gjor66$Abro-REP-Tele2-Principal/export/txt' -g 'https://pad.exegetes.eu.org/p/g.DSXI1kGFT1gjor66$Abro-REP-Tele2-Garde/export/txt'
+# ./cocktail -d MonDossier -p Abro2 -b 'https://pad.exegetes.eu.org/p/g.DSXI1kGFT1gjor66$Abro-REP-Tele2-Principal/export/txt' -g 'https://pad.exegetes.eu.org/p/g.DSXI1kGFT1gjor66$Abro-REP-Tele2-Garde/export/txt'
 
 die() {
   echo -e "$@" >&2
@@ -248,6 +239,13 @@ publish() {
 }
 
 ### MAIN ###
+if test -e "cocktail.conf";
+then
+  source "cocktail.conf"
+else
+  die "cocktail.conf is missing, see config.conf.smp for example"
+fi
+
 OPTERR=1
 while getopts "b:d:g:p:h" option;
 do