From: Matteo Nastasi (mop) Date: Mon, 21 Feb 2011 07:31:45 +0000 (+0100) Subject: INSTALL.sh: exit code value for check fixed and run check before all other operations X-Git-Tag: 3.3.0~1 X-Git-Url: https://mop.ddnsfree.com/gitweb/?p=brisk.git;a=commitdiff_plain;h=00efaa64a898c38f0cc0e1ba3e2ec5411f9ed21e INSTALL.sh: exit code value for check fixed and run check before all other operations --- diff --git a/INSTALL.sh b/INSTALL.sh index 61a4bff..3f66103 100755 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -16,10 +16,19 @@ web_only="FALSE" brisk_conf="brisk.conf.pho" if [ "$1" = "chk" ]; then - find -name '*.pho' -o -name '*.phh' -o -name '*.php' -exec php5 -l {} \; + set -e + oldifs="$IFS" + IFS=' +' + for i in $(find -name '*.pho' -o -name '*.phh' -o -name '*.php'); do + php5 -l $i + done exit 0 fi +# before all check errors on the sources +$0 chk || exit 3 + if [ "$1" = "pkg" ]; then if [ "$2" != "" ]; then tag="$2" @@ -40,13 +49,14 @@ if [ "$1" = "pkg" ]; then exit 0 fi - if [ -f $HOME/.brisk_install ]; then . $HOME/.brisk_install fi + if [ "x$cookie_path" = "x" ]; then cookie_path=$web_path fi + function usage () { echo echo "$1 -h"