deal with required params

This commit is contained in:
a-sansara 2017-07-07 23:10:23 +02:00
parent e3e0ab7522
commit 3af48a0e72
2 changed files with 4 additions and 2 deletions

View File

@ -10,4 +10,4 @@ description = "simple bash bes installer"
keywords = "bash, bes, install" keywords = "bash, bes, install"
[require] [require]
bes.echo = 1.1 bes.echo = master

View File

@ -14,7 +14,9 @@ function bes.install ()
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" bes.echo.title "Installing $app ${Coff}in" "$path"
if [ -z "$app" ] || [ -s "$url" ]; then
bes.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