diff --git a/bin/preinstall_cleanup.sh b/bin/preinstall_cleanup.sh index 526621c417ade76dd902d57492d3d970a6895c8c..70c9f522351773f4f578b2374840ee587c5ee0ac 100755 --- a/bin/preinstall_cleanup.sh +++ b/bin/preinstall_cleanup.sh @@ -17,6 +17,7 @@ # # ---------------------------------------------------------------------- # 2013-11-06 axel.hahn@iml.unibe.ch +# 2022-11-25 axel.hahn@unibe.ch do not check json in target dir; shellfixes # ====================================================================== # ---------------------------------------------------------------------- @@ -41,8 +42,8 @@ echo if [ $# -lt 2 ]; then - echo Syntax is - echo `basename $0` [webroot] [tgz-archive] [[deleteflag]] + echo "Syntax is" + echo "$( basename $0 ) [webroot] [tgz-archive] [[deleteflag]]" exit 1 fi @@ -58,10 +59,12 @@ # see #2235 - for nodejs apps the target dir is different # ls -ld $prjdir/public_html/ || ls -ld $prjdir/public/ || exit 2 # echo $prjdir | fgrep "/www/" || exit 2 - ls -l $prjdir/*.json || exit 2 + + # skip this - aum spider has no json + # ls -l $prjdir/*.json || exit 2 # check tgz - file $tgz | fgrep "gzip compressed" || exit 3 + file $tgz | grep -F "gzip compressed" || exit 3 # ---------------------------------------------------------------------- # MAIN @@ -97,9 +100,9 @@ bDelete=1 testfile=$delfile if [ ! -d $delfile ]; then - testfile=`dirname $delfile` + testfile=$( dirname $delfile ) fi - echo $testfile | fgrep -f $filelist >/dev/null + echo $testfile | grep -F -f $filelist >/dev/null if [ $? -eq 0 ]; then echo KEEP: $delfile else