Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b961e5a1ad | ||
|
3c2ce3203c | ||
|
c9957b3be2 |
4
bes.ini
4
bes.ini
|
@ -1,7 +1,7 @@
|
||||||
[project]
|
[project]
|
||||||
vendor = bes
|
vendor = bes
|
||||||
name = install
|
name = install
|
||||||
version = 1.0
|
version = 1.4
|
||||||
license = "GNU GPL v3"
|
license = "GNU GPL v3"
|
||||||
author = a-Sansara
|
author = a-Sansara
|
||||||
type = library
|
type = library
|
||||||
|
@ -10,4 +10,4 @@ description = "simple bash bes installer"
|
||||||
keywords = "bash, bes, install"
|
keywords = "bash, bes, install"
|
||||||
|
|
||||||
[require]
|
[require]
|
||||||
bes.echo = 1.2
|
bes.echo = 1.4
|
||||||
|
|
|
@ -12,6 +12,7 @@ function bes.install ()
|
||||||
local app=${1}
|
local app=${1}
|
||||||
local url=${2}
|
local url=${2}
|
||||||
local path=${3:-/usr/local/bin}
|
local path=${3:-/usr/local/bin}
|
||||||
|
local inst=${4:-}
|
||||||
local done=1
|
local done=1
|
||||||
echo.title "Installing $app ${Coff}in" "$path"
|
echo.title "Installing $app ${Coff}in" "$path"
|
||||||
if [ -z "$app" ] || [ -s "$url" ]; then
|
if [ -z "$app" ] || [ -s "$url" ]; then
|
||||||
|
@ -30,6 +31,11 @@ function bes.install ()
|
||||||
else
|
else
|
||||||
echo.error "install directory do not exists : ${Cspe}$path"
|
echo.error "install directory do not exists : ${Cspe}$path"
|
||||||
fi
|
fi
|
||||||
|
if [ ! -z "$inst" ]; then
|
||||||
|
if bes.exists "$inst"; then
|
||||||
|
$inst
|
||||||
|
fi
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user