From: Matteo Nastasi (mop) Date: Mon, 14 Feb 2011 07:46:38 +0000 (+0100) Subject: pkg target and renamed the old --ck in chk in INSTALL.sh management script X-Git-Tag: 3.2.2^0 X-Git-Url: https://mop.ddnsfree.com/gitweb/?p=brisk.git;a=commitdiff_plain;h=ad7383d9a2d4465787f541e366e1ac0c7fb906f9 pkg target and renamed the old --ck in chk in INSTALL.sh management script --- diff --git a/INSTALL.sh b/INSTALL.sh index 8b7ea98..61a4bff 100755 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -15,11 +15,32 @@ proxy_path="$HOME/brisk-priv/proxy" web_only="FALSE" brisk_conf="brisk.conf.pho" -if [ "$1" = "--ck" ]; then +if [ "$1" = "chk" ]; then find -name '*.pho' -o -name '*.phh' -o -name '*.php' -exec php5 -l {} \; exit 0 fi +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 @@ -29,7 +50,8 @@ 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"