Compare commits

..

No commits in common. "master" and "1.1" have entirely different histories.
master ... 1.1

2 changed files with 8 additions and 14 deletions

View File

@ -1,7 +1,7 @@
[project]
vendor = bes
name = install
version = 1.4
version = 1.0
license = "GNU GPL v3"
author = a-Sansara
type = library
@ -10,4 +10,4 @@ description = "simple bash bes installer"
keywords = "bash, bes, install"
[require]
bes.echo = 1.4
bes.echo = master

View File

@ -12,11 +12,10 @@ function bes.install ()
local app=${1}
local url=${2}
local path=${3:-/usr/local/bin}
local inst=${4:-}
local done=1
echo.title "Installing $app ${Coff}in" "$path"
bes.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
bes.echo.error "in bes.install : \$app '$app' & \$url '$url' are required" 1
fi
if [ -f "./$app" ]; then
rm ./$app
@ -27,17 +26,12 @@ function bes.install ()
if [ -d $path ]; then
sudo mv ./$app $path/$app
local done=$?
echo.state $done
bes.echo.state $done
else
echo.error "install directory do not exists : ${Cspe}$path"
fi
if [ ! -z "$inst" ]; then
if bes.exists "$inst"; then
$inst
fi
bes.echo.error "install directory do not exists : ${Cspe}$path"
fi
else
echo.error "can not download latest version of app $app. please check url : $url"
bes.echo.error "can not download latest version of app $app. please check url : $url"
fi
echo.rs $done
bes.echo.rs $done
}