Browse Source

meilleure gestion de base dir

Sniperovitch 8 years ago
parent
commit
8d518a25b5
1 changed files with 5 additions and 2 deletions
  1. 5 2
      cocktail

+ 5 - 2
cocktail

@@ -241,9 +241,12 @@ publish() {
 }
 
 ### MAIN ###
-if test -e "cocktail.conf";
+base=$( cd $( dirname "${BASH_SOURCE[0]}" ) && pwd )
+
+echo "base=$base"
+if test -e "$base/cocktail.conf";
 then
-  source "cocktail.conf"
+  source "$base/cocktail.conf"
 else
   die "cocktail.conf is missing, see config.conf.smp for example"
 fi