From: Jason Boyer Date: Mon, 23 Jan 2023 12:23:15 +0000 (-0500) Subject: LP2003707: Add an OpenSRF Core Config Param to autogen.sh X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9602117cdbd2e31d38f3df7c890fa893bbda5ad4;p=evergreen%2Fpines.git LP2003707: Add an OpenSRF Core Config Param to autogen.sh What it says on the tin, if you change the name or location of opensrf_core.xml now you can still run autogen.sh. Signed-off-by: Jason Boyer Signed-off-by: Josh Stompro Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/extras/autogen.sh b/Open-ILS/src/extras/autogen.sh index 176e1daead..cc2d91df37 100755 --- a/Open-ILS/src/extras/autogen.sh +++ b/Open-ILS/src/extras/autogen.sh @@ -105,12 +105,14 @@ cd "BINDIR" # Initialize our variables PROXIMITY="" +OSRF_CORE="SYSCONFDIR/opensrf_core.xml" # --------------------------------------------------------------------------- # Load the command line options and set the global vars # --------------------------------------------------------------------------- -while getopts "u h" flag; do +while getopts "c:uh" flag; do case $flag in + "c") OSRF_CORE="$OPTARG";; "u") PROXIMITY="REFRESH";; "h") usage && exit;; esac @@ -122,40 +124,40 @@ echo "" OUTFILE="$JSDIR/fmall.js" echo "Updating fieldmapper" -perl -MOpenILS::Utils::Configure -e 'print OpenILS::Utils::Configure::fieldmapper();' > "$OUTFILE" +perl -MOpenILS::Utils::Configure -e 'print OpenILS::Utils::Configure::fieldmapper();' -- --osrf-config "$OSRF_CORE" > "$OUTFILE" cp "$OUTFILE" "$FMDOJODIR/" echo " -> $OUTFILE" OUTFILES="$OUTFILE" OUTFILE="$JSDIR/fmcore.js" echo "Updating web_fieldmapper" -perl -MOpenILS::Utils::Configure -e 'print OpenILS::Utils::Configure::fieldmapper("web_core");' > "$OUTFILE" +perl -MOpenILS::Utils::Configure -e 'print OpenILS::Utils::Configure::fieldmapper("web_core");' -- --osrf-config "$OSRF_CORE" > "$OUTFILE" echo " -> $OUTFILE" OUTFILES="$OUTFILES $OUTFILE" OUTFILE="$JSDIR/*/OrgTree.js" echo "Updating OrgTree" -perl -MOpenILS::Utils::Configure -e "OpenILS::Utils::Configure::org_tree_js('$JSDIR', 'OrgTree.js');" +perl -MOpenILS::Utils::Configure -e "OpenILS::Utils::Configure::org_tree_js('$JSDIR', 'OrgTree.js');" -- --osrf-config "$OSRF_CORE" cp "$JSDIR/en-US/OrgTree.js" "$FMDOJODIR/" echo " -> $OUTFILE" OUTFILES="$OUTFILES $OUTFILE" OUTFILE="$SLIMPACDIR/*/lib_list.inc" echo "Updating OrgTree HTML" -perl -MOpenILS::Utils::Configure -e "OpenILS::Utils::Configure::org_tree_html_options('$SLIMPACDIR', 'lib_list.inc');" +perl -MOpenILS::Utils::Configure -e "OpenILS::Utils::Configure::org_tree_html_options('$SLIMPACDIR', 'lib_list.inc');" -- --osrf-config "$OSRF_CORE" echo " -> $OUTFILE" OUTFILES="$OUTFILES $OUTFILE" OUTFILE="$SLIMPACDIR/locales.inc" echo "Updating locales selection HTML" -perl -MOpenILS::Utils::Configure -e "print OpenILS::Utils::Configure::locale_html_options();" > "$OUTFILE" +perl -MOpenILS::Utils::Configure -e "print OpenILS::Utils::Configure::locale_html_options();" -- --osrf-config "$OSRF_CORE" > "$OUTFILE" echo " -> $OUTFILE" OUTFILES="$OUTFILES $OUTFILE" if [ ! -z "$PROXIMITY" ] then echo "Refreshing proximity of org units" - perl -MOpenILS::Utils::Configure -e "OpenILS::Utils::Configure::org_tree_proximity();" + perl -MOpenILS::Utils::Configure -e "OpenILS::Utils::Configure::org_tree_proximity();" -- --osrf-config "$OSRF_CORE" fi # Generate a hash of the generated files