From 00efaa64a898c38f0cc0e1ba3e2ec5411f9ed21e Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Mon, 21 Feb 2011 08:31:45 +0100 Subject: [PATCH] INSTALL.sh: exit code value for check fixed and run check before all other operations --- INSTALL.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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" -- 2.17.1