Browse Source

mirrorpad est un repo externe maintenant

David Sniperovitch 8 years ago
parent
commit
84421c3dc0
4 changed files with 16 additions and 5 deletions
  1. 1 1
      .travis.yml
  2. 2 3
      build.sh
  3. 12 1
      cocktail
  4. 1 0
      cocktail.conf.smp

+ 1 - 1
.travis.yml

@@ -12,7 +12,7 @@ before_install:
   - sudo apt-get install -y texlive-latex-base texlive-font-utils texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra
   - sudo apt-get install -y python-pip
   - sudo pip install pandoc-latex-environment
-  - sudo ./build.sh
+  - ./build.sh
 notifications:
   irc:
     channels:

+ 2 - 3
build.sh

@@ -1,8 +1,7 @@
 #!/bin/sh
 cd && git clone https://github.com/hugoroy/exegetesDoc.git
 cd -
+cd && git clone https://github.com/sniperovitch/mirrorpad.git
+cd -
 cp -v cocktail.conf.smp cocktail.conf
-cp -v mirror_pad.yml.smp mirror_pad.yml
-curl -L https://cpanmin.us | perl - App::cpanminus
-cpanm --no-test URI::Encode Etherpad Config::YAML IO::Socket::SSL LWP::UserAgent
 

+ 12 - 1
cocktail

@@ -89,6 +89,12 @@ init_check() {
     die "[$FUNCNAME]: WORKING_FOLDER=$WORKING_FOLDER should be a writable folder"
   fi
 
+  # MIRRORPAD shoud exists and executable
+  if test ! -x "$MIRRORPAD";
+  then
+    die "[$FUNCNAME]: MIRRORPAD=$MIRRORPAD should be an axecutable file"
+  fi
+
   # external tools
   for tool in touch pandoc pdflatex
   do
@@ -113,7 +119,7 @@ mirror_pad() {
   local filename=$2
   verbose "[$FUNCNAME] url=$url filename=$filename"
 
-  RESPONSE=$(perl $base/mirror_pad.pl $url > "$filename")
+  RESPONSE=$($MIRRORPAD $url > "$filename")
   RC=$?
 
   local errstr="[$FUNCNAME] RC=[$RC] $RESPONSE"
@@ -410,6 +416,11 @@ then
   then
     echo "$$ STORE not found in config file"
   fi
+  if test -z "$MIRRORPAD";
+  then
+    echo "$$ MIRRORPAD not found in config file"
+  fi
+
   if test "$error_in_config" -eq 1;
   then
     die "Errors in config file, maybee empty ?" $RC_CONFIG_PARAM

+ 1 - 0
cocktail.conf.smp

@@ -7,3 +7,4 @@ WORKING_FOLDER=$HOME/tmp
 
 STORE=$HOME/store
 
+MIRRORPAD=$HOME/mirrorpad/mirrorpad