Merge branch 'release-2.140.136'
[feisty_meow.git] / scripts / core / variables.sh
index c9c3d37d7ebc76affcb2edd5bcd9f59e9d8ad62b..c51490ba690cab30b890ae6e5337d15328c76dff 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 ##############
 
@@ -190,24 +190,31 @@ define_yeti_variable DEFAULT_FEISTYMEOW_ORG_DIR=/opt/feistymeow.org
   
   # variables for perl.
   
-  define_yeti_variable PERLLIB+="/usr/lib/perl5"
-  if [ "$OS" == "Windows_NT" ]; then
-    define_yeti_variable PERLIO=:perlio
-      # choose perl's IO over the ms-windows version so we can handle file
-      # bytes properly.
-  fi
+  if [[ $PERLLIB =~ .*$FEISTY_MEOW_SCRIPTS.* ]]; then
+    if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then
+      echo skipping PERLLIB since already mentions feisty meow scripts.
+    fi
+  else
+    define_yeti_variable PERLLIB+="/usr/lib/perl5"
+    if [ "$OS" == "Windows_NT" ]; then
+      define_yeti_variable PERLIO=:perlio
+        # choose perl's IO over the ms-windows version so we can handle file
+        # bytes properly.
+    fi
 
-  # iterate across our sub-directories and find the perl scripts.
-  # this currently only looks one level down.
-  for i in $FEISTY_MEOW_SCRIPTS/*; do
-    if [ -d "$i" ]; then
-      # check if there is a perl file present; add the folder to PERLLIB if so.
-      ls $i/*.pl &>/dev/null
-      if [ $? -eq 0 ]; then
-        PERLLIB+=":$(dos_to_unix_path $i)"
+    # iterate across our sub-directories and find the perl scripts.
+    # this currently only looks one level down.
+    for i in $FEISTY_MEOW_SCRIPTS/*; do
+      if [ -d "$i" ]; then
+        # check if there is a perl file present; add the folder to PERLLIB if so.
+        ls $i/*.pl &>/dev/null
+        if [ $? -eq 0 ]; then
+          PERLLIB+=":$(dos_to_unix_path $i)"
+        fi
       fi
-    fi
-  done
+    done
+  fi
+
   define_yeti_variable PERL5LIB=$PERLLIB
   #echo PERLLIB is now $PERLLIB