6 ftok_path="/var/lib/brisk"
10 if [ -f $HOME/.trusty_install ]; then
11 . $HOME/.trusty_install
16 echo "$1 [-p|--package]"
17 echo "$1 [-n 3|5] [-w web_dir] [-k <ftok_dir>] [-W]"
18 echo " -p build \"binary\" version of the package"
20 echo " -n number of players - def. $n_players"
21 echo " -w dir where place the web tree - def. \"$web_path\""
22 echo " -k dir where place ftok files - def. \"$ftok_path\""
23 echo " -W install web files only"
27 function get_param () {
28 echo "X$2" | grep -q "^X$1\$"
44 if [ "$1" = "-p" -o "$1" = "--package" ]; then
46 tar zcvf brisk-img.tgz `find brisk-img -name INSTALL.sh -o -name '*.png' -o -name '*.jpg' -o -name '*.gif' -o -name '.htaccess' | grep -v '/src_'`
51 while [ $# -gt 0 ]; do
54 -n*) n_players="`get_param "-n" "$1" "$2"`"; sh=$?;;
55 -w*) web_path="`get_param "-w" "$1" "$2"`"; sh=$?;;
56 -k*) ftok_path="`get_param "-k" "$1" "$2"`"; sh=$?;;
58 -h) usage $0; exit 0;;
68 echo " web_path: \"$web_path\""
69 echo " ftok_path: \"$ftok_path\""
70 echo " n_players: $n_players"
73 for i in `find -type d -name 'img'`; do
74 ii="`echo "$i" | cut -c 3- `"
75 install -d ${web_path}/$ii
76 install -m 644 `find $ii -name INSTALL.sh -o -name '*.png' -o -name '*.jpg' -o -name '*.gif' -o -name '.htaccess' | grep -v '/src_'` ${web_path}/$ii