deal with required params
This commit is contained in:
parent
e3e0ab7522
commit
3af48a0e72
2
bes.ini
2
bes.ini
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user