X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=INSTALL.sh;h=a4b076c5b840a4717b8fbd80e55997f12855dac2;hb=f3b76ddf96b6efe09b15a3784c45753b97d0c0ec;hp=705fdf2fb38ce84d8e1ad2a42306dcff12394d19;hpb=d075f429e05ba9d75cbbb372f90ec268d25932af;p=brisk.git diff --git a/INSTALL.sh b/INSTALL.sh index 705fdf2..a4b076c 100755 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -31,7 +31,7 @@ function usage () { echo "$1 -h" echo "$1 chk - run lintian on all ph* files." echo "$1 pkg - build brisk packages." - echo "$1 [-W] [-n 3|5] [-c 3|8] [-t <(n>=4)>] [-T ] [-G ] [-A ] [-a ] [-f ] [-p ] [-U ] [-u ] [-d ] [-w ] [-k ] [-l ] [-y ] [-P ] [-x]" + echo "$1 [-W] [-n 3|5] [-c 2|8] [-t <(n>=4)>] [-T ] [-G ] [-A ] [-a ] [-f ] [-p ] [-U ] [-u ] [-d ] [-w ] [-k ] [-l ] [-y ] [-P ] [-x]" echo " -h this help" echo " -f use this config file" echo " -p save preferences in the file" @@ -90,6 +90,7 @@ function searchetc() { # # MAIN # +declare -a nam if [ "$1" = "chk" ]; then set -e oldifs="$IFS" @@ -100,7 +101,7 @@ if [ "$1" = "chk" ]; then done taggit="$(git describe --tags | sed 's/^v//g')" - tagphp="$(grep "^\$G_brisk_version = " web/Obj/brisk.phh | sed 's/^[^"]\+"//g;s/".*//g')" + tagphp="$(grep "^\$G_brisk_version = " web/Obj/brisk.phh | sed 's/^[^"]\+"//g;s/".*//g')" # ' emacs hell if [ "$taggit" != "$tagphp" ]; then echo echo "WARNING: taggit: [$taggit] tagphp: [$tagphp]" @@ -111,17 +112,28 @@ 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" - nam2="curl-de-sac_${tag}.tgz" - echo "Build packages ${nam1}, ${nam2} and ${nam3}." + nam_idx=0 + nam[$nam_idx]="brisk_${tag}.tgz" + nam_idx=$((nam_idx + 1)) + nam[$nam_idx]="brisk-img_${tag}.tgz" + + if [ -d ../curl-de-sac ]; then + nam_idx=$((nam_idx + 1)) + nam[$nam_idx]="curl-de-sac_${tag}.tgz" + fi + pkg_list="" + sep="" + for i in ${nam[@]}; do + pkg_list="${pkg_list}${sep}${i}" + sep=", " + done + echo "Build packages ${pkg_list}." read -p "Proceed [y/n]: " a if [ "$a" != "y" -a "$a" != "Y" ]; then exit 1 @@ -130,9 +142,11 @@ if [ "$1" = "pkg" ]; then cd ../brisk-img git archive --format=tar --prefix=brisk-${tag}/brisk-img/ $tag | gzip > ../$nam2 cd - - cd ../curl-de-sac - git archive --format=tar --prefix=brisk-${tag}/curl-de-sac/ $tag | gzip > ../$nam3 - cd - + if [ -d ../curl-de-sac ]; then + cd ../curl-de-sac + git archive --format=tar --prefix=brisk-${tag}/curl-de-sac/ $tag | gzip > ../$nam3 + cd - + fi exit 0 fi @@ -277,8 +291,8 @@ IFS=' # ftokk_path="${ftok_path}k" -if [ $card_hand -lt 3 -o $card_hand -gt 8 ]; then - echo "card_hand ($card_hand) out of range (3 <= c <= 8)" +if [ $card_hand -lt 2 -o $card_hand -gt 8 ]; then + echo "card_hand ($card_hand) out of range (2 <= c <= 8)" exit 1 fi @@ -345,6 +359,8 @@ if [ "$web_only" = "FALSE" ]; then done chmod -R 777 ${proxy_path}/bin5 + mkdir -p "${legal_path}" + chmod 777 "${legal_path}" fi install -d ${web_path}__ for i in $(find web -type d | grep '/' | sed 's/^....//g'); do @@ -354,6 +370,10 @@ done for i in $(find web -name '.htaccess' -o -name '*.php' -o -name '*.phh' -o -name '*.pho' -o -name '*.css' -o -name '*.js' -o -name '*.mp3' -o -name '*.swf' -o -name 'terms-of-service*' | sed 's/^....//g'); do install -m 644 "web/$i" "${web_path}__/$i" done + +# hardlink for nginx managed websocket files. +ln "${web_path}__/xynt_test01.php" "${web_path}__/xynt_test01_wss.php" + if [ "$test_add" = "TRUE" ]; then for i in $(find webtest -name '.htaccess' -o -name '*.php' -o -name '*.phh' -o -name '*.pho' -o -name '*.css' -o -name '*.js' -o -name '*.mp3' -o -name '*.swf' -o -name 'terms-of-service*' | sed 's/^........//g'); do install -m 644 "webtest/$i" "${web_path}__/$i"