[19156] | 1 | #!/bin/bash
|
---|
[2719] | 2 | # if this file is executed, /bin/sh is used, as we don't start with #!
|
---|
| 3 | # this should work under ash, bash, zsh, ksh, sh style shells.
|
---|
[6774] | 4 | gsdllang=""
|
---|
[6892] | 5 | # encoding inputs and outputs
|
---|
| 6 | gsdltoenc=""
|
---|
| 7 | gsdlfromenc=""
|
---|
[2719] | 8 |
|
---|
[6774] | 9 | # see if the shell has any language environment variables set
|
---|
| 10 | # see locale(7) manpage for this ordering.
|
---|
| 11 | if test ! -z "$LC_ALL" ; then
|
---|
[6892] | 12 | gsdllang="$LC_ALL"
|
---|
[6774] | 13 | elif test ! -z "$LANG"; then
|
---|
[6892] | 14 | gsdllang="$LANG"
|
---|
[6774] | 15 | fi
|
---|
| 16 |
|
---|
[6892] | 17 |
|
---|
[6774] | 18 | # note... all our output strings have the charset hard-coded, but
|
---|
| 19 | # people may be using a different encoding in their terminal. LANG
|
---|
[6892] | 20 | # strings look like "en_NZ.UTF-8".
|
---|
[6774] | 21 |
|
---|
[6892] | 22 | # Determine the requested output encoding
|
---|
| 23 | case $gsdllang in
|
---|
| 24 | *.*)
|
---|
| 25 | gsdltoenc=`echo $gsdllang | sed 's/.*\.//'`
|
---|
| 26 | ;;
|
---|
| 27 | esac
|
---|
| 28 |
|
---|
[6774] | 29 | # Our french and spanish strings are currently in iso-8859-1 encoding.
|
---|
| 30 | case $gsdllang in
|
---|
| 31 | fr*|FR*)
|
---|
| 32 | gsdllang=fr
|
---|
[6892] | 33 | gsdlfromenc="iso-8859-1"
|
---|
[6774] | 34 | ;;
|
---|
| 35 | es*|ES*)
|
---|
| 36 | gsdllang=es
|
---|
[6892] | 37 | gsdlfromenc="iso-8859-1"
|
---|
[6774] | 38 | ;;
|
---|
| 39 | ru*|RU*)
|
---|
| 40 | gsdllang=ru
|
---|
[6892] | 41 | gsdlfromenc="koi8r"
|
---|
[6774] | 42 | ;;
|
---|
| 43 | *) # default
|
---|
| 44 | gsdllang=en
|
---|
[6892] | 45 | gsdlfromenc="iso-8859-1"
|
---|
[6774] | 46 | ;;
|
---|
| 47 | esac
|
---|
| 48 |
|
---|
[6892] | 49 | # "iconv" is the program for converting text between encodings.
|
---|
| 50 | gsdliconv=`which iconv 2>/dev/null`
|
---|
[8734] | 51 | if test $? -ne 0 || test ! -x "$gsdliconv" || test -z "$gsdlfromenc" || test -z "$gsdltoenc"; then
|
---|
[6892] | 52 | # we can't convert encodings from some reason
|
---|
| 53 | gsdliconv="cat"
|
---|
| 54 | else
|
---|
| 55 | # add the encodings
|
---|
| 56 | gsdliconv="$gsdliconv -f $gsdlfromenc -t $gsdltoenc"
|
---|
| 57 | fi
|
---|
| 58 |
|
---|
[2719] | 59 | # make sure we are sourced, and not run
|
---|
| 60 |
|
---|
| 61 | if test "$0" != "`echo $0 | sed s/setup\.bash//`" ; then
|
---|
| 62 | # if $0 contains "setup.bash" we've been run... $0 is shellname if sourced.
|
---|
| 63 | # One exception is zsh has an option to set it temporarily to the script name
|
---|
| 64 | if test -z "$ZSH_NAME" ; then
|
---|
| 65 | # we aren't using zsh
|
---|
| 66 | gsdl_not_sourced=true
|
---|
| 67 | fi
|
---|
[2709] | 68 | fi
|
---|
[2719] | 69 |
|
---|
| 70 | if test -n "$gsdl_not_sourced" ; then
|
---|
[6774] | 71 | case "$gsdllang" in
|
---|
| 72 | "es")
|
---|
[6892] | 73 | eval $gsdliconv <<EOF
|
---|
| 74 | Error: Asegúrese de compilar este guión, no de ejecutarlo. P. ej.:
|
---|
| 75 | $ source setup.bash
|
---|
| 76 | o
|
---|
| 77 | $ . ./setup.bash
|
---|
| 78 | no
|
---|
| 79 | $ ./setup.bash
|
---|
| 80 | EOF
|
---|
[6774] | 81 | ;;
|
---|
| 82 | "fr")
|
---|
[6892] | 83 | eval $gsdliconv <<EOF
|
---|
[7029] | 84 | Erreur: Assurez-vous de "sourcer" le script, plutôt que de l'exécuter. Ex:
|
---|
| 85 | $ source setup.bash
|
---|
| 86 | ou
|
---|
| 87 | $ . ./setup.bash
|
---|
| 88 | pas
|
---|
| 89 | $ ./setup.bash
|
---|
[6892] | 90 | EOF
|
---|
[6774] | 91 | ;;
|
---|
| 92 | "ru")
|
---|
[6892] | 93 | eval $gsdliconv <<EOF
|
---|
| 94 | ïÛÉÂËÁ: õÄÏÓÔÏ×ÅÒØÔÅÓØ × ÉÓÔÏÞÎÉËÅ ÜÔÏÇÏ ÓËÒÉÐÔÁ. îÅ ÉÓÐÏÌÎÑÊÔÅ ÅÇÏ.
|
---|
| 95 | îÁÐÒÉÍÅÒ:
|
---|
| 96 | $ source setup.bash
|
---|
| 97 | ÉÌÉ
|
---|
| 98 | $ . ./setup.bash
|
---|
| 99 | ÎÅÔ
|
---|
| 100 | $ ./setup.bash
|
---|
| 101 | EOF
|
---|
[6774] | 102 | ;;
|
---|
| 103 | *)
|
---|
[6892] | 104 | eval $gsdliconv <<EOF
|
---|
| 105 | Error: Make sure you source this script, not execute it. Eg:
|
---|
| 106 | $ source setup.bash
|
---|
| 107 | or
|
---|
| 108 | $ . ./setup.bash
|
---|
| 109 | not
|
---|
| 110 | $ ./setup.bash
|
---|
| 111 | EOF
|
---|
[6774] | 112 | ;;
|
---|
| 113 | esac
|
---|
[2719] | 114 | elif test -n "$GSDLHOME" ; then
|
---|
[6774] | 115 | case "$gsdllang" in
|
---|
| 116 | "es")
|
---|
[6892] | 117 | echo '¡Su ambiente ya está listo para Greenstone!' | eval $gsdliconv
|
---|
[6774] | 118 | ;;
|
---|
| 119 | "fr")
|
---|
[6892] | 120 | echo 'Votre environnement est déjà préparé pour Greenstone!' | eval $gsdliconv
|
---|
[6774] | 121 | ;;
|
---|
| 122 | "ru")
|
---|
[6892] | 123 | echo '÷ÁÛÅ ÏËÒÕÖÅÎÉÅ ÕÖÅ ÎÁÓÔÒÏÅÎÏ ÄÌÑ Greenstone!' | eval $gsdliconv
|
---|
[6774] | 124 | ;;
|
---|
| 125 | *)
|
---|
[6820] | 126 | echo 'Your environment is already set up for Greenstone!'
|
---|
[6774] | 127 | ;;
|
---|
| 128 | esac
|
---|
[2719] | 129 | elif test ! -f setup.bash ; then
|
---|
[6774] | 130 | case "$gsdllang" in
|
---|
| 131 | "es")
|
---|
[6892] | 132 | eval $gsdliconv <<EOF
|
---|
| 133 | Usted debe compilar el guión desde el interior del directorio de inicio
|
---|
| 134 | de Greenstone.
|
---|
| 135 | EOF
|
---|
[6774] | 136 | ;;
|
---|
| 137 | "fr")
|
---|
[6892] | 138 | echo 'Vous devez trouver la source du script dans le répertoire de base de Greenstone' | eval $gsdliconv
|
---|
[6774] | 139 | ;;
|
---|
| 140 | "ru")
|
---|
[6892] | 141 | eval $gsdliconv <<EOF
|
---|
| 142 | ÷ÁÍ ÎÅÏÂÈÏÄÉÍ ÉÓÔÏÞÎÉË ÓËÒÉÐÔÁ ÉÚ ÂÁÚÏ×ÏÊ ÄÉÒÅËÔÏÒÉÉ Greenstone
|
---|
| 143 | EOF
|
---|
[6774] | 144 | ;;
|
---|
| 145 | *)
|
---|
[6820] | 146 | echo 'You must source the script from within the Greenstone home directory'
|
---|
[6774] | 147 | ;;
|
---|
| 148 | esac
|
---|
[2719] | 149 | else
|
---|
[2906] | 150 | GSDLHOME=`pwd`
|
---|
| 151 | export GSDLHOME
|
---|
[26794] | 152 |
|
---|
| 153 | if test "x$GSDLOS" = "x" ; then
|
---|
| 154 | GSDLOS=`uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
---|
| 155 | # check for running bash under cygwin
|
---|
| 156 | if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ;
|
---|
| 157 | then
|
---|
| 158 | GSDLOS=windows
|
---|
| 159 | fi
|
---|
[2719] | 160 | fi
|
---|
[2906] | 161 | export GSDLOS
|
---|
| 162 |
|
---|
[23878] | 163 | # check for running bash under mingw
|
---|
| 164 | if test "`echo $GSDLOS | sed 's/mingw//'`" != "$GSDLOS" ;
|
---|
| 165 | then
|
---|
| 166 | GSDLOS=windows
|
---|
| 167 | fi
|
---|
| 168 | export GSDLOS
|
---|
| 169 |
|
---|
[23947] | 170 | # Establish cpu architecture
|
---|
| 171 | # 32-bit or 64-bit?
|
---|
| 172 | UNAME_HW_MACH=`uname -m`
|
---|
| 173 |
|
---|
| 174 | # Original test
|
---|
| 175 | # if test "`echo x$UNAME_HW_MACH | sed 's/^x.*_64$/x/'`" == "x" ;
|
---|
| 176 | # then
|
---|
| 177 | # GSDLARCH=64
|
---|
| 178 | # else
|
---|
| 179 | # GSDLARCH=32
|
---|
| 180 | # fi
|
---|
| 181 |
|
---|
| 182 | # Following test came from VirtualBox's Guest Additions autostart.sh
|
---|
| 183 | # (adapted for use in Greenstone)
|
---|
| 184 | case "$UNAME_HW_MACH" in
|
---|
| 185 | i[3456789]86|x86|i86pc)
|
---|
| 186 | GSDLARCH='32'
|
---|
| 187 | ;;
|
---|
| 188 | x86_64|amd64|AMD64)
|
---|
| 189 | GSDLARCH='64'
|
---|
| 190 | ;;
|
---|
| 191 | *)
|
---|
| 192 | echo "Unknown architecture: $UNAME_HW_MACH"
|
---|
| 193 | ;;
|
---|
| 194 | esac
|
---|
| 195 |
|
---|
[32205] | 196 | # for xpdf tools, need to know whether we're using the bin32 or bin64 folder
|
---|
| 197 | BITNESS=$GSDLARCH
|
---|
| 198 | export BITNESS
|
---|
| 199 |
|
---|
[23947] | 200 | # Only want non-trival GSDLARCH value set if there is evidence of
|
---|
| 201 | # the installed bin (lib, ...) directories using linux32, linux64
|
---|
| 202 | # (otherwise probably looking at an SVN compiled up version for single OS)
|
---|
| 203 | if test ! -d "$GSDLHOME/bin/$GSDLOS$GSDLARCH" ;
|
---|
| 204 | then
|
---|
| 205 | GSDLARCH=""
|
---|
| 206 | fi
|
---|
| 207 |
|
---|
| 208 | export GSDLARCH
|
---|
| 209 |
|
---|
| 210 | PATH=$GSDLHOME/bin/script:$GSDLHOME/bin/$GSDLOS$GSDLARCH:$PATH
|
---|
[2906] | 211 | export PATH
|
---|
[18188] | 212 |
|
---|
[23588] | 213 | if test "$GSDLOS" = "linux" ; then
|
---|
[23947] | 214 | LD_LIBRARY_PATH="$GSDLHOME/lib/$GSDLOS$GSDLARCH:$LD_LIBRARY_PATH"
|
---|
[23588] | 215 | export LD_LIBRARY_PATH
|
---|
| 216 | elif test "$GSDLOS" = "darwin" ; then
|
---|
[23947] | 217 | DYLD_LIBRARY_PATH="$GSDLHOME/lib/$GSDLOS$GSDLARCH:$DYLD_LIBRARY_PATH"
|
---|
[23588] | 218 | export DYLD_LIBRARY_PATH
|
---|
| 219 | fi
|
---|
[20933] | 220 |
|
---|
[17667] | 221 | # Override Imagemagick and Ghostscript paths to the bundled applications shipped with greenstone if they exists otherwise use default environment variables.
|
---|
| 222 |
|
---|
[24610] | 223 | # Imagemagick env vars are set in bin\script\gs-magick.pl
|
---|
[17667] | 224 |
|
---|
[17673] | 225 |
|
---|
| 226 | # Note: Ghostscript is only bundled with Greenstone on Mac and Windows, not on Linux. The code below should be used only for the Darwin platform
|
---|
| 227 | # for Windows please see setup.bat
|
---|
[23947] | 228 | if test -d "$GSDLHOME/bin/$GSDLOS$GSDLARCH/ghostscript" ; then
|
---|
| 229 | PATH="$GSDLHOME/bin/$GSDLOS$GSDLARCH/ghostscript/bin":"$PATH"
|
---|
[17673] | 230 | export PATH
|
---|
[17667] | 231 |
|
---|
[23947] | 232 | GS_LIB="$GSDLHOME/bin/$GSDLOS$GSDLARCH/ghostscript/share/ghostscript/8.63/lib"
|
---|
[17673] | 233 | export GS_LIB
|
---|
[17667] | 234 |
|
---|
[23947] | 235 | GS_FONTPATH="$GSDLHOME/bin/$GSDLOS$GSDLARCH/ghostscript/share/ghostscript/8.63/Resource/Font"
|
---|
[17673] | 236 | export GS_FONTPATH
|
---|
[17667] | 237 | fi
|
---|
| 238 |
|
---|
[23588] | 239 |
|
---|
[17667] | 240 |
|
---|
[2906] | 241 | MANPATH=$MANPATH:$GSDLHOME/packages/mg/man
|
---|
| 242 | export MANPATH
|
---|
[6774] | 243 | case "$gsdllang" in
|
---|
| 244 | "es")
|
---|
[6892] | 245 | echo 'Su ambiente ha sido configurado para correr los programas Greenstone.' | eval $gsdliconv
|
---|
[6774] | 246 | ;;
|
---|
| 247 | "fr")
|
---|
[6892] | 248 | echo 'Votre environnement a été configuére avec succès pour exécuter Greenstone' | eval $gsdliconv
|
---|
[6774] | 249 | ;;
|
---|
| 250 | "ru")
|
---|
[6892] | 251 | eval $gsdliconv <<EOF
|
---|
| 252 | ÷ÁÛÅ ÏËÒÕÖÅÎÉÅ ÂÙÌÏ ÕÓÐÅÛÎÏ ÎÁÓÔÒÏÅÎÏ, ÞÔÏÂÙ ÕÓÔÁÎÏ×ÉÔØ Greenstone
|
---|
| 253 | EOF
|
---|
[6774] | 254 | ;;
|
---|
| 255 | *)
|
---|
[6820] | 256 | echo 'Your environment has successfully been set up to run Greenstone'
|
---|
[6774] | 257 | ;;
|
---|
| 258 | esac
|
---|
[2719] | 259 | fi
|
---|
| 260 | unset gsdl_not_sourced
|
---|
[6892] | 261 | unset gsdliconv
|
---|
| 262 | unset gsdlfromenc
|
---|
| 263 | unset gsdltoenc
|
---|
[14980] | 264 |
|
---|
[23893] | 265 | if test "x$gsopt_noexts" != "x1" ; then
|
---|
| 266 | if test -e ext; then
|
---|
| 267 | for gsdl_ext in ext/*; do
|
---|
| 268 | if test -d $gsdl_ext; then
|
---|
| 269 | cd $gsdl_ext > /dev/null
|
---|
| 270 | if test -e setup.bash ; then
|
---|
| 271 | source ./setup.bash
|
---|
| 272 | fi
|
---|
| 273 | cd ../..
|
---|
| 274 | fi
|
---|
| 275 | done
|
---|
[21603] | 276 | fi
|
---|
[14980] | 277 | fi
|
---|
| 278 |
|
---|
[23726] | 279 | if test -e apache-httpd ; then
|
---|
| 280 | echo "+Adding in executable path for apache-httpd"
|
---|
[23947] | 281 | PATH=$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH/bin:$PATH
|
---|
[23726] | 282 | export PATH
|
---|
| 283 |
|
---|
| 284 | if test "$GSDLOS" = "linux" ; then
|
---|
[31406] | 285 | LD_LIBRARY_PATH="$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH/lib:$LD_LIBRARY_PATH"
|
---|
[23726] | 286 | export LD_LIBRARY_PATH
|
---|
| 287 |
|
---|
| 288 | elif test "$GSDLOS" = "darwin" ; then
|
---|
[23947] | 289 | DYLD_LIBRARY_PATH="$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH/lib:$DYLD_LIBRARY_PATH"
|
---|
[23726] | 290 | export DYLD_LIBRARY_PATH
|
---|
| 291 | fi
|
---|
| 292 | fi
|
---|
| 293 |
|
---|
[17667] | 294 | if test -e local ; then
|
---|
[18488] | 295 | if test -e local/setup.bash ; then
|
---|
| 296 | echo "Sourcing local/setup.bash"
|
---|
| 297 | cd local ; source setup.bash ; cd ..
|
---|
| 298 | fi
|
---|
| 299 |
|
---|
[17667] | 300 | PATH=$GSDLHOME/local/bin:$PATH
|
---|
| 301 | export PATH
|
---|
| 302 | LD_LIBRARY_PATH=$GSDLHOME/local/lib:$LD_LIBRARY_PATH
|
---|
| 303 | export LD_LIBRARY_PATH
|
---|
[14980] | 304 | fi
|
---|
| 305 |
|
---|
[31972] | 306 | # Only for GS2: work out java, and if the bundled jre is found, then set Java env vars with it
|
---|
| 307 | # Then the same java will be consistently available for all aspects of GS2 (server or GLI, and any subshells these launch)
|
---|
| 308 | if [ "x$GSDL3SRCHOME" = "x" ] ; then
|
---|
[32011] | 309 | MINIMUM_JAVA_VERSION=1.5.0_00
|
---|
[14980] | 310 |
|
---|
[32011] | 311 | echo "GS2 installation: Checking for Java of version $MINIMUM_JAVA_VERSION or above"
|
---|
| 312 |
|
---|
[31972] | 313 | SEARCH4J_EXECUTABLE="$GSDLHOME/bin/$GSDLOS$GSDLARCH/search4j"
|
---|
| 314 | if [ -f "$SEARCH4J_EXECUTABLE" ]; then
|
---|
| 315 |
|
---|
| 316 | # Give search4j a hint to find Java depending on the platform
|
---|
| 317 | # we now include a JRE with Mac (Mountain) Lion, because from Yosemite onwards there's no system Java on Macs
|
---|
| 318 | HINT=`cd "$GSDLHOME";pwd`/packages/jre
|
---|
| 319 |
|
---|
| 320 | # we can't use boolean operator -a to do the AND, since it doesn't "short-circuit" if the first test fails
|
---|
| 321 | # see http://www.tldp.org/LDP/abs/html/comparison-ops.html
|
---|
[32013] | 322 |
|
---|
| 323 |
|
---|
[31972] | 324 | if [ "x$GSDLOS" = "xdarwin" ] && [ ! -d "$HINT" ]; then
|
---|
| 325 | # http://java.dzone.com/articles/java-findingsetting
|
---|
| 326 | # explains that /usr/libexec/java_home will print the default JDK
|
---|
| 327 | # regardless of which Mac OS we're on. Tested on Maverick, Lion, Leopard
|
---|
| 328 | # (run `/usr/libexec/java_home -v 1.7` to find a specific version)
|
---|
[32013] | 329 | macHINT=`/usr/libexec/java_home 2>&1`
|
---|
| 330 | status=$?
|
---|
| 331 | # if no java installed, then HINT will contain:
|
---|
| 332 | # Unable to find any JVMs matching version "(null)".
|
---|
| 333 | # No Java runtime present, try --request to install.
|
---|
| 334 | # and the status of running /usr/libexec/java_home will not be 0 but 1:
|
---|
| 335 | if [ "$status" = "0" ]; then
|
---|
| 336 | HINT=$macHINT
|
---|
| 337 | else
|
---|
| 338 | echo "No system Java on this mac..."
|
---|
| 339 | fi
|
---|
[31972] | 340 | fi
|
---|
| 341 |
|
---|
| 342 | javahome="`"$SEARCH4J_EXECUTABLE" -p "$HINT" -m $MINIMUM_JAVA_VERSION`"
|
---|
| 343 | BUNDLED_JRE="$GSDLHOME/packages/jre"
|
---|
| 344 |
|
---|
| 345 | if [ "$?" != "0" ]; then
|
---|
| 346 | echo "setup.bash: Could not find Java in the environment or installation."
|
---|
| 347 | echo "Set JAVA_HOME or JRE_HOME, and put it on the PATH, if working with Java tools like Lucene."
|
---|
[32012] | 348 | elif [[ "x$javahome" != "x" && "x$javahome" != "x$BUNDLED_JRE" ]]; then
|
---|
[32013] | 349 | echo "Using Java found at $javahome"
|
---|
[31972] | 350 | if [ "x$JAVA_HOME" = "x" ]; then
|
---|
| 351 | # if Java env vars not already set, then set them to the $javahome found
|
---|
| 352 | echo "Found a Java on the system. Setting up GS2's Java environment to use this"
|
---|
| 353 | export JAVA_HOME=$javahome
|
---|
| 354 | export PATH=$JAVA_HOME/bin:$PATH
|
---|
| 355 | fi
|
---|
| 356 | # else JAVA_HOME, and PATH presumably too, would already be set
|
---|
| 357 | elif [ -d "$GSDLHOME/packages/jre" ]; then
|
---|
| 358 | echo "Found a bundled JRE. Setting up GS2's Java environment to use this"
|
---|
| 359 | export JRE_HOME=$GSDLHOME/packages/jre
|
---|
| 360 | export PATH=$JRE_HOME/bin:$PATH
|
---|
| 361 | else
|
---|
| 362 | # can we ever really get here?
|
---|
| 363 | echo "Java environment not set and bundled JRE doesn't exist. Some tools need the Java environment. Proceeding without..."
|
---|
| 364 | fi
|
---|
| 365 | fi
|
---|
| 366 | fi
|
---|
| 367 |
|
---|
[20923] | 368 | # if the Perl-for-greenstone tarfile has been installed in the bin/linux
|
---|
| 369 | # folder, then we set things up to use that, instead of a system perl
|
---|
[23947] | 370 | if [ -d "$GSDLHOME/bin/$GSDLOS$GSDLARCH/perl" ] ; then
|
---|
[21805] | 371 |
|
---|
[24363] | 372 | if [ -d "$GSDLHOME/bin/$GSDLOS$GSDLARCH/perl/bin" ] ; then
|
---|
| 373 | PERLPATH=$GSDLHOME/bin/$GSDLOS$GSDLARCH/perl/bin
|
---|
| 374 | export PERLPATH
|
---|
| 375 | PATH=$PERLPATH:$PATH
|
---|
| 376 | export PATH
|
---|
| 377 | fi
|
---|
[21805] | 378 |
|
---|
| 379 | if test "$GSDLOS" = "linux" ; then
|
---|
[23947] | 380 | LD_LIBRARY_PATH=$GSDLHOME/bin/$GSDLOS$GSDLARCH/perl/lib/5.8.9/i686-linux-thread-multi/CORE:$LD_LIBRARY_PATH
|
---|
[21805] | 381 | export LD_LIBRARY_PATH
|
---|
| 382 | elif test "$GSDLOS" = "darwin" ; then
|
---|
[23947] | 383 | DYLD_LIBRARY_PATH=$GSDLHOME/bin/$GSDLOS$GSDLARCH/perl/lib/5.8.9/darwin-thread-multi-2level/CORE:$DYLD_LIBRARY_PATH
|
---|
[21805] | 384 | export DYLD_LIBRARY_PATH
|
---|
| 385 | fi
|
---|
| 386 |
|
---|
[20923] | 387 | if [ "x$PERL5LIB" = "x" ] ; then
|
---|
[23947] | 388 | PERL5LIB=$GSDLHOME/bin/$GSDLOS$GSDLARCH/perl/lib
|
---|
[20923] | 389 | else
|
---|
[23947] | 390 | PERL5LIB=$GSDLHOME/bin/$GSDLOS$GSDLARCH/perl/lib:$PERL5LIB
|
---|
[20923] | 391 | fi
|
---|
| 392 | export PERL5LIB
|
---|
[21805] | 393 |
|
---|
[20923] | 394 | echo ""
|
---|
| 395 | echo "***** Perl installation detected inside Greenstone."
|
---|
| 396 | echo "Command-line scripts need to be run with \"perl -S ...\""
|
---|
| 397 | echo " e.g. perl -S import.pl -removeold demo"
|
---|
| 398 | echo ""
|
---|
| 399 | # else we may in future need to update PERL5LIB with some other (further) locations
|
---|
| 400 | fi
|
---|
[29372] | 401 |
|
---|
| 402 | # Perl >= v5.18.* randomises map iteration order within a process
|
---|
| 403 | export PERL_PERTURB_KEYS=0
|
---|
[31829] | 404 |
|
---|
| 405 | # turn off certificate errors when using wget to retrieve over https
|
---|
| 406 | # (to avoid turning it off with the --no-check-certificate flag to each wget cmd)
|
---|
| 407 | # See https://superuser.com/questions/508696/wget-without-no-check-certificate
|
---|
| 408 | # https://www.gnu.org/software/wget/manual/html_node/Wgetrc-Location.html
|
---|
| 409 | export WGETRC=$GSDLHOME/bin/$GSDLOS/wgetrc
|
---|