From: Mike Rylander Date: Tue, 5 Apr 2022 14:38:55 +0000 (-0400) Subject: LP#1967770: Make sure cover image dirs exist X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a17a6aa05b36c9b78526a354aa92d10217f93b1b;p=working%2FEvergreen.git LP#1967770: Make sure cover image dirs exist This commit teaches autogen.sh, which should be run after each upgrade, how to check for and create the required locations for cover image upload. Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/extras/autogen.sh b/Open-ILS/src/extras/autogen.sh index 7cf95020ff..90f6da2481 100755 --- a/Open-ILS/src/extras/autogen.sh +++ b/Open-ILS/src/extras/autogen.sh @@ -24,6 +24,7 @@ set -u JSDIR="LOCALSTATEDIR/web/opac/common/js" FMDOJODIR="LOCALSTATEDIR/web/js/dojo/fieldmapper" SLIMPACDIR="LOCALSTATEDIR/web/opac/extras/slimpac" +COVERDIR="LOCALSTATEDIR/web/opac/extras/ac" # --------------------------------------------------------------------------- # Make sure we're not root and are able to write to the destination directory @@ -76,11 +77,20 @@ function check_files_writable { OHNO=0 # Verify we're able to write everywhere we need -for DIR in "$JSDIR" "$FMDOJODIR" "$SLIMPACDIR" +for DIR in "$JSDIR" "$FMDOJODIR" "$SLIMPACDIR" "$COVERDIR" do check_dir_writable "$DIR" done +# Verify we have cover image directories, creating where needed +for DIR in "small/r" "medium/r" "large/r" +do + if [ ! -d "$COVERDIR/$DIR" ]; then + mkdir -p "$COVERDIR/$DIR" + fi + check_dir_writable "$COVERDIR/$DIR" +done + for FILE in "$JSDIR/fmall.js" "$JSDIR/fmcore.js" "$JSDIR/*/OrgTree.js" "$SLIMPACDIR/*/lib_list.inc" "$SLIMPACDIR/locales.inc" "LOCALSTATEDIR/web/eg_cache_hash" do check_files_writable "$FILE"