From: Andy Witter Date: Fri, 1 Sep 2017 23:33:44 +0000 (-0400) Subject: Fix but adding locales X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=52690c8d9f99064af142fb2241833dff86b60a52;p=contrib%2Fpines%2Fgenasys.git Fix but adding locales --- diff --git a/templates/setup-head.sh b/templates/setup-head.sh index 99e1483..9581f67 100755 --- a/templates/setup-head.sh +++ b/templates/setup-head.sh @@ -159,16 +159,16 @@ then echo "Setting up custom locales..." for LOCALE_FILE in $LOCALE_DIR/* do - LOCALE="$(cat $LOCALE_FILE | awk -F'"' '{ print $2 }')" - if grep -q "$LOCALE_FILE" $EG_VHOST + LOCALE="$(echo $LOCALE_FILE | awk -F"/" '{ print $7 }' | awk -F"." '{ print $1 }' | tr '[:upper:]' '[:lower:]')" + if grep "$LOCALE_FILE" $EG_VHOST | grep -qv '#' then - sleep 2 + sleep 1 echo echo "Locale $LOCALE already configured in $EG_VHOST" echo "not adding it again." else #LOCALE="$(cat $LOCALE_FILE | awk -F'"' '{ print $2 }')" - sleep 2 + sleep 1 echo echo "Found $LOCALE_FILE Locale for this file is: $LOCALE" sed -i "/#PerlAddVar OILSWebLocale \"\/openils\/var\/data\/locale\/opac\/fr-CA.po\"/a \ \PerlAddVar OILSWebLocale \"${LOCALE_FILE}\"" "$EG_VHOST"