update bes.echo dependency to 1.2

This commit is contained in:
a-sansara 2018-12-22 11:38:53 +01:00
parent 5d39ad2255
commit 17a86492d7
4 changed files with 176 additions and 137 deletions

View File

@ -1,7 +1,7 @@
[project] [project]
vendor = bes vendor = bes
name = config name = config
version = 1.0 version = 1.1
license = "GNU GPL v3" license = "GNU GPL v3"
author = a-Sansara author = a-Sansara
type = application type = application
@ -11,5 +11,5 @@ keywords = "bash, bes, config"
[require] [require]
bes.ini = 1.1 bes.ini = 1.1
bes.echo = 1.1 bes.echo = 1.2
bes.install = 1.0 bes.install = 1.1

291
dist/bes-config vendored
View File

@ -1,6 +1,103 @@
#!/bin/bash #!/bin/bash
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# #
# @author a-Sansara - https://git.pluie.org/meta-tech/bes-color
# @app bes-color
# @license GNU GPL v3
# @date 2017-10-23 23:30:54 CET
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.color.boot () {
BES_NOCOLOR=${BES_NOCOLOR:-0}
if [ "$BES_NOCOLOR" -eq 0 ]; then
# by convention all colors begins with 'C' uppercase
# followed by a name in lowercase
# background foreground
# R G B R G B
color.set "Chead" 53 114 160 195 223 255
color.set "Cheadsep" 53 114 160 252 212 102
# background
# R G B
color.bg "Cdone" 63 172 138
color.bg "Cfail" 172 63 85
# foreground
# R G B
color.fg "Ctitle" 133 92 181
color.fg "Cheadline" 22 74 133
color.fg "Csep" 80 80 80
color.fg "Cerr" 194 48 64
color.fg "Cval" 255 175 95
color.fg "Ckey" 40 168 134
color.fg "Caction" 106 183 241
color.fg "Csymbol" 255 175 95
color.fg "Citem" 92 147 181
color.fg "Cusa" 255 172 0
color.fg "Cspe" 255 214 166
color.fg "Copt" 94 215 255
color.fg "Ccom" 175 135 175
color.fg "Ctext" 0 132 101
color.fg "Cmeta" 39 100 170
Coff="\\033[m"
fi
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function color.fg()
{
local -n var=$1
var="\033[1;38;2;$2;$3;$4m"
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function color.bg()
{
local -n var=$1
var="\033[1;48;2;$2;$3;$4m"
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function color.set()
{
local -n var=$1
var="\033[1;48;2;$2;$3;$4;1;38;2;$5;$6;$7m"
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function color.rgb ()
{
local c=${3:-0}
local v=$1
local -n r=${2}_r
local -n g=${2}_g
local -n b=${2}_b
if [ -z "$v" ]; then
r=$c
g=$c
b=$c
return
fi
r=${v%%;*}
[ "$v" = "$r" ] && v='' || v="${v#*;}"
if [ -z "$r" ]; then r=$c; fi
g=${v%%;*}
[ "$v" = "$g" ] && v='' || v="${v#*;}"
if [ -z "$g" ]; then g=$c; fi
b=${v%%;*}
if [ -z "$b" ]; then b=$c; fi
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function color.env () {
local -n var=${2:-shenv}
local v=ctx$1
local ctxPROD="174 8 49"
local ctxINT="218 84 0"
local ctxDEV="218 159 0"
local ctxLOCAL="122 122 122"
if [ -z "${!v}" ]; then
v=ctxLOCAL
SHENV_CTX=LOCAL
fi
var=${!v}
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bes.color.boot
#
# @author a-Sansara - https://git.pluie.org/meta-tech/bes-echo # @author a-Sansara - https://git.pluie.org/meta-tech/bes-echo
# @app bes-echo # @app bes-echo
# @license GNU GPL v3 # @license GNU GPL v3
@ -9,80 +106,49 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.echo.boot () function bes.echo.boot ()
{ {
BES_TERM_WIDTH=${BES_TERM_WIDTH:-105} BES_TERM_WIDTH=${COLUMNS:-130}
BES_NOCOLOR=${BES_NOCOLOR:-0} BES_TERM_WIDTH=$(($BES_TERM_WIDTH - 20))
if [ "$BES_NOCOLOR" -eq 0 ]; then
Cok="\033[0;38;5;43m"; Cko="\033[0;38;5;217m"
Coff="\033[m"; Ctitle="\033[1;48;5;24;1;38;5;15m"
Cdone="\033[1;48;5;36;1;38;5;15m"; Cfail="\033[1;48;5;196;1;38;5;15m"
Cspe="\033[1;38;5;223m"; Citem="\033[1;38;5;214m"
Cval="\033[1;38;5;215m"; Cusa="\033[1;38;5;214m"
Cbra="\033[1;38;5;203m"; Crepo="\033[1;38;5;223m"
Cmeta="\033[1;38;5;30m"; Ctext="\033[1;38;5;30m"
Copt="\033[1;38;5;81m"; Csep="\033[1;38;5;241m"
Cerr="\033[1;38;5;196m"; Ccom="\033[0;38;5;139m"
Csection="\033[1;38;5;97m"; Caction="\033[0;38;5;37m"
fi
} }
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.echo () function echo.msg ()
{ {
local msg=${1:-''} local c=${2:-}
local isAction=${2:-'0'} local m=${1:-}
local symbol=${3:-' *'} echo -e " $c$m$Coff"
if [ ! "$BES_NOCOLOR" = 1 ]; then
local c=" "
if [ -z "$isAction" ] || [ "$isAction" = 1 ]; then
c=$Caction
fi
if [ ! "$isAction" = 0 ]; then
c=" $Citem$symbol $c"
fi
echo -e " $c$msg$Coff"
else
if [ ! "$isAction" = 0 ]; then
msg=" $symbol $msg"
fi
echo -e "$msg"
fi
} }
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.echo.action () function echo.state ()
{ {
bes.echo "$1" 1 local len=14
} echo -en " $Csep"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ printf "%0.s-" $(seq 1 $(($BES_TERM_WIDTH-${len})))
function bes.echo.title ()
{
echo
bes.echo " ${Citem}☪ ${Csection}$1 ${Cspe}$2${Coff}"
echo
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.echo.keyval ()
{
local c=': '
if [ ! "$BES_NOCOLOR" = 1 ]; then
c="$Citem: ${Cval}"
fi
local len="%-15s "
# printf "%s %s [UP]\n" $PROC_NAME "${line:${#PROC_NAME}}"
bes.echo "$(printf $len $1) $c$2 " 1 " "
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.echo.state ()
{
local len=8
printf "%0.s " $(seq 1 $(($BES_TERM_WIDTH-${len})))
if [ "$1" = 0 ]; then if [ "$1" = 0 ]; then
echo -e "${Cdone} OK ${Coff}" echo -e "$Coff $Cdone OK $Coff\n"
else else
echo -e "${Cfail} KO ${Coff}" echo -e "$Coff $Cfail KO $Coff\n"
fi fi
} }
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.echo.rs () function echo.action ()
{
local symbol=${3:-*}
local color=${4:-Citem}
echo -e " $Csymbol$symbol ${Caction}$1 ${!color}$2$Coff"
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function echo.title ()
{
echo -e "\n $Csymbol☪ $Ctitle$1 $Coff$Cspe$2$Coff\n"
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function echo.keyval ()
{
local len=${3:-20}
local c="$Ckey: ${Cval}"
echo -e " $Ckey $(printf "%-${len}s " "$1") ${c}${2} $Coff"
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function echo.rs ()
{ {
local rs=${1:-0} local rs=${1:-0}
if [ "$rs" -eq 0 ]; then if [ "$rs" -eq 0 ]; then
@ -92,47 +158,39 @@ function bes.echo.rs ()
fi fi
} }
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.echo.error () function echo.error ()
{ {
local leave=${2:-0}
echo -e "\n${Cerr} error : ${Coff}\n\t$1 ${Coff}\n" echo -e "\n${Cerr} error : ${Coff}\n\t$1 ${Coff}\n"
if [ "$leave" = "1" ]; then
exit 1;
fi
} }
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.echo.sepline () function echo.sepline ()
{ {
local char=${1:-'_'} local char=${1:-'_'}
local width=${2:-$BES_TERM_WIDTH} local width=${2:-$BES_TERM_WIDTH}
echo -ne "${Csep} " echo -ne "${Cheadline} "
printf "%0.s$char" $(seq 1 $width) printf "%0.s$char" $(seq 1 $width)
echo -e "${Coff}" echo -e "${Coff}"
} }
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.echo.app () function echo.app ()
{ {
local msg=${1:-''} local msg=${1:-''}
local version=${2:-''} local version=${2:-''}
local author=${3:-'a-Sansara'} local author=${3:-'a-Sansara'}
local license=${3:-'GNU GPL v3'}
if [ ! -z "$2" ]; then if [ ! -z "$2" ]; then
msg="$msg ${Cval}v$version" msg="$msg ${Cval}v$version"
fi fi
local len="$1${version}license : GNU GPL v3 author:$author" local len="$1${version}license : $license author:$author"
bes.echo.sepline echo.sepline
echo -ne "\n $Ctitle $msg $Coff" echo -ne "\n $Chead $msg $Coff"
printf "%0.s " $(seq 1 $(($BES_TERM_WIDTH-${#len}-15))) printf "%0.s " $(seq 1 $(($BES_TERM_WIDTH-${#len}-15)))
echo -e " ${Cmeta}license : ${Coff}GNU GPL v3 ${Cmeta}author : ${Cval}$author" echo -e " ${Cmeta}license : ${Coff}$license ${Cmeta}author : ${Cval}$author"
bes.echo.sepline echo.sepline
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.echo.colormap ()
{
for fgbg in 38 48 ; do
for color in {0..256} ; do
echo -en "\e[${fgbg};5;${color}m ${color}\t\e[0m"
if [ $((($color + 1) % 7)) == 0 ] ; then
echo
fi
done
echo
done
} }
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bes.echo.boot bes.echo.boot
@ -143,7 +201,7 @@ bes.echo.boot
# @license GNU GPL v3 # @license GNU GPL v3
# @date 2017-05-19 22:52:59 CET # @date 2017-05-19 22:52:59 CET
# #
# bes alter '__' to '_' , rename bes.ini to bes.ini # bes alter '__' to '_' , rename read_ini to bes.ini
# #
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# #
@ -167,7 +225,7 @@ function bes.ini ()
function check_prefix() function check_prefix()
{ {
if ! [[ "${VARNAME_PREFIX}" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]] ;then if ! [[ "${VARNAME_PREFIX}" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]] ;then
echo "bes.ini: invalid prefix '${VARNAME_PREFIX}'" >&2 echo "read_ini: invalid prefix '${VARNAME_PREFIX}'" >&2
return 1 return 1
fi fi
} }
@ -175,7 +233,7 @@ function bes.ini ()
function check_ini_file() function check_ini_file()
{ {
if [ ! -r "$INI_FILE" ] ;then if [ ! -r "$INI_FILE" ] ;then
echo "bes.ini: '${INI_FILE}' doesn't exist or not" \ echo "read_ini: '${INI_FILE}' doesn't exist or not" \
"readable" >&2 "readable" >&2
return 1 return 1
fi fi
@ -194,7 +252,7 @@ function bes.ini ()
} }
# unset all local functions and restore shopt settings before returning # unset all local functions and restore shopt settings before returning
# from bes.ini() # from read_ini()
function cleanup_bash() function cleanup_bash()
{ {
shopt -q -u ${SWITCH_SHOPT} shopt -q -u ${SWITCH_SHOPT}
@ -261,8 +319,8 @@ function bes.ini ()
done done
if [ -z "$INI_FILE" ] && [ "${CLEAN_ENV}" = 0 ] ;then if [ -z "$INI_FILE" ] && [ "${CLEAN_ENV}" = 0 ] ;then
echo -e "Usage: bes.ini [-c] [-b 0| -b 1]] [-p PREFIX] FILE"\ echo -e "Usage: read_ini [-c] [-b 0| -b 1]] [-p PREFIX] FILE"\
"[SECTION]\n or bes.ini -c [-p PREFIX]" >&2 "[SECTION]\n or read_ini -c [-p PREFIX]" >&2
cleanup_bash cleanup_bash
return 1 return 1
fi fi
@ -442,8 +500,10 @@ function bes.install ()
local url=${2} local url=${2}
local path=${3:-/usr/local/bin} local path=${3:-/usr/local/bin}
local done=1 local done=1
bes.echo.title "Installing $app ${Coff}in" "$path" echo.title "Installing $app ${Coff}in" "$path"
if [ -z "$app" ] || [ -s "$url" ]; then
echo.error "in bes.install : \$app '$app' & \$url '$url' are required" 1
fi
if [ -f "./$app" ]; then if [ -f "./$app" ]; then
rm ./$app rm ./$app
fi fi
@ -453,20 +513,20 @@ function bes.install ()
if [ -d $path ]; then if [ -d $path ]; then
sudo mv ./$app $path/$app sudo mv ./$app $path/$app
local done=$? local done=$?
bes.echo.state $done echo.state $done
else else
bes.echo.error "install directory do not exists : ${Cspe}$path" echo.error "install directory do not exists : ${Cspe}$path"
fi fi
else else
bes.echo.error "can not download latest version of app $app. please check url : $url" echo.error "can not download latest version of app $app. please check url : $url"
fi fi
bes.echo.rs $done echo.rs $done
} }
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.config () function bes.config ()
{ {
bes.echo.title "Reading Configuration Project" $APP_NAME echo.title "Reading Configuration Project" $APP_NAME
if [ -f ./bes.ini ]; then if [ -f ./bes.ini ]; then
bes.ini ./bes.ini -p bes -b 1 bes.ini ./bes.ini -p bes -b 1
@ -477,49 +537,28 @@ function bes.config ()
value="bes_project_$key" value="bes_project_$key"
if [ ! -z "${!value}" ]; then if [ ! -z "${!value}" ]; then
hasconf=1 hasconf=1
bes.echo.keyval $key "${!value}" echo.keyval $key "${!value}"
fi fi
done done
if [ "$hasconf" = "0" ]; then if [ "$hasconf" = "0" ]; then
bes.echo " -" echo.msg " -"
fi fi
bes.echo.title "Dependencies" echo.title "Dependencies"
bes.ini ./bes.ini require -p bes -b 1 bes.ini ./bes.ini require -p bes -b 1
local prefix="bes_require" local prefix="bes_require"
local key="" local key=""
for name in ${bes_ALL_VARS}; do for name in ${bes_ALL_VARS}; do
key=${name:${#prefix}+1} key=${name:${#prefix}+1}
local tmp=${key//_/.} local tmp=${key//_/.}
bes.echo.keyval "$tmp" "${!name}" echo.keyval "$tmp" "${!name}"
done done
else else
bes.echo " $project does not have bes.ini file" echo " $project does not have bes.ini file"
fi fi
echo echo
} }
BES_BIN_DIR="$(cd "$( dirname "${BASH_SOURCE[0]}")" && pwd)"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.fn.list ()
{
while IFS= read -r line; do
if [ ! "${line:11}" = "bes.fn.list" ] && [ ! "${line:11}" = "read_ini" ]; then
echo "${line:11}"
fi
done < <(declare -F)
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.export ()
{
# $1 : fromFnName
# $2 : toFnName
local code=$(declare -f "$1")
local len=${#1}
source /dev/stdin < <(echo "$2${code:len}")
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.usage () function bes.usage ()
{ {
@ -543,7 +582,7 @@ function bes.usage ()
# @date 2017-06-16 04:38:52 CET # @date 2017-06-16 04:38:52 CET
# #
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BES_VERSION=0.2 BES_VERSION=1.1
BES_NAME="bes-config" BES_NAME="bes-config"
BES_URL="https://git.pluie.org/meta-tech/$BES_NAME/raw/latest/dist/$BES_NAME" BES_URL="https://git.pluie.org/meta-tech/$BES_NAME/raw/latest/dist/$BES_NAME"
APP_DIR=$(pwd) APP_DIR=$(pwd)
@ -556,7 +595,7 @@ function bes.main ()
if [ "$1" = "version" ] || [ "$1" = "-v" ]; then if [ "$1" = "version" ] || [ "$1" = "-v" ]; then
echo $BES_VERSION echo $BES_VERSION
else else
bes.echo.app $BES_NAME $BES_VERSION echo.app $BES_NAME $BES_VERSION
echo echo
if [ "$1" = "install" ] || [ "$1" = "-i" ]; then if [ "$1" = "install" ] || [ "$1" = "-i" ]; then
bes.install "$BES_NAME" "$BES_URL" "$2" bes.install "$BES_NAME" "$BES_URL" "$2"

View File

@ -3,7 +3,7 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function bes.config () function bes.config ()
{ {
bes.echo.title "Reading Configuration Project" $APP_NAME echo.title "Reading Configuration Project" $APP_NAME
if [ -f ./bes.ini ]; then if [ -f ./bes.ini ]; then
bes.ini ./bes.ini -p bes -b 1 bes.ini ./bes.ini -p bes -b 1
@ -14,24 +14,24 @@ function bes.config ()
value="bes_project_$key" value="bes_project_$key"
if [ ! -z "${!value}" ]; then if [ ! -z "${!value}" ]; then
hasconf=1 hasconf=1
bes.echo.keyval $key "${!value}" echo.keyval $key "${!value}"
fi fi
done done
if [ "$hasconf" = "0" ]; then if [ "$hasconf" = "0" ]; then
bes.echo " -" echo.msg " -"
fi fi
bes.echo.title "Dependencies" echo.title "Dependencies"
bes.ini ./bes.ini require -p bes -b 1 bes.ini ./bes.ini require -p bes -b 1
local prefix="bes_require" local prefix="bes_require"
local key="" local key=""
for name in ${bes_ALL_VARS}; do for name in ${bes_ALL_VARS}; do
key=${name:${#prefix}+1} key=${name:${#prefix}+1}
local tmp=${key//_/.} local tmp=${key//_/.}
bes.echo.keyval "$tmp" "${!name}" echo.keyval "$tmp" "${!name}"
done done
else else
bes.echo " $project does not have bes.ini file" echo " $project does not have bes.ini file"
fi fi
echo echo
} }

View File

@ -7,7 +7,7 @@
# @date 2017-06-16 04:38:52 CET # @date 2017-06-16 04:38:52 CET
# #
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BES_VERSION=0.2 BES_VERSION=1.1
BES_NAME="bes-config" BES_NAME="bes-config"
BES_URL="https://git.pluie.org/meta-tech/$BES_NAME/raw/latest/dist/$BES_NAME" BES_URL="https://git.pluie.org/meta-tech/$BES_NAME/raw/latest/dist/$BES_NAME"
APP_DIR=$(pwd) APP_DIR=$(pwd)
@ -20,7 +20,7 @@ function bes.main ()
if [ "$1" = "version" ] || [ "$1" = "-v" ]; then if [ "$1" = "version" ] || [ "$1" = "-v" ]; then
echo $BES_VERSION echo $BES_VERSION
else else
bes.echo.app $BES_NAME $BES_VERSION echo.app $BES_NAME $BES_VERSION
echo echo
if [ "$1" = "install" ] || [ "$1" = "-i" ]; then if [ "$1" = "install" ] || [ "$1" = "-i" ]; then
bes.install "$BES_NAME" "$BES_URL" "$2" bes.install "$BES_NAME" "$BES_URL" "$2"