X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=INSTALL.sh;h=3f66103991fbc35afa2c1bd589ee6db57fc67e26;hb=e50ff5b78be70468c56ee5218a5ef10e60901ef7;hp=8b7ea985ec83b8797d4a57eae1c087075024d1c1;hpb=6439161bcddfa229747cd24f79ef13ecb7cf9060;p=brisk.git diff --git a/INSTALL.sh b/INSTALL.sh index 8b7ea98..3f66103 100755 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -15,21 +15,53 @@ proxy_path="$HOME/brisk-priv/proxy" web_only="FALSE" brisk_conf="brisk.conf.pho" -if [ "$1" = "--ck" ]; then - find -name '*.pho' -o -name '*.phh' -o -name '*.php' -exec php5 -l {} \; +if [ "$1" = "chk" ]; then + 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" + else + tag="$(git describe)" + fi + nam1="brisk_${tag}.tgz" + nam2="brisk-img_${tag}.tgz" + echo "Build packages ${nam1} and ${nam2}." + read -p "Proceed [y/n]: " a + if [ "$a" != "y" -a "$a" != "Y" ]; then + exit 1 + fi + git archive --format=tar --prefix=brisk-${tag}/brisk/ $tag | gzip > ../$nam1 + cd ../brisk-img + git archive --format=tar --prefix=brisk-${tag}/brisk-img/ $tag | gzip > ../$nam2 + cd - + 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" - echo "$1 --ck - run lintian on all ph* files." + echo "$1 chk - run lintian on all ph* files." + echo "$1 pkg - build brisk packages." echo "$1 [-W] [-n 3|5] [-t <(n>=4)>] [-T ] [-a ] [-f conffile] [-p outconf] [-d TRUE|FALSE] [-w web_dir] [-k ] [-l ] [-y ] [-c ]" echo " -h this help" echo " -f use this config file"