X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=blobdiff_plain;f=scripts%2Fcore%2Fvariables.sh;fp=scripts%2Fcore%2Fvariables.sh;h=c51490ba690cab30b890ae6e5337d15328c76dff;hp=c9c3d37d7ebc76affcb2edd5bcd9f59e9d8ad62b;hb=de0da7f2f7958d4ba652ff2ef5c79991700141ac;hpb=a4c99c6006b3aa20b5f65f02c2d30db7e790083a diff --git a/scripts/core/variables.sh b/scripts/core/variables.sh index c9c3d37d..c51490ba 100644 --- a/scripts/core/variables.sh +++ b/scripts/core/variables.sh @@ -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