From e6cefa543a5478bdf1b5e1856591241c1b0742ef Mon Sep 17 00:00:00 2001 From: a-Sansara Date: Sat, 16 Nov 2019 01:51:29 +0100 Subject: [PATCH] update bes.install dependency to 1.4 --- bes.ini | 4 ++-- dist/bes-config | 12 +++++++++--- src/main.sh | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/bes.ini b/bes.ini index d1acdd0..30c9b95 100644 --- a/bes.ini +++ b/bes.ini @@ -1,7 +1,7 @@ [project] vendor = bes name = config -version = 1.2 +version = 1.3 license = "GNU GPL v3" author = a-Sansara type = application @@ -10,4 +10,4 @@ description = "bes-config is a small bash bes config display application" keywords = "bash, bes, config" [require] -bes.install = 1.2 +bes.install = 1.4 diff --git a/dist/bes-config b/dist/bes-config index 2000b81..d1ecac4 100755 --- a/dist/bes-config +++ b/dist/bes-config @@ -245,7 +245,7 @@ function echo.app () local msg=${1:-''} local version=${2:-''} local author=${3:-'a-Sansara'} - local license=${3:-'GNU GPL v3'} + local license=${4:-'GNU GPL v3'} if [ ! -z "$2" ]; then msg="$msg ${Cval}v$version" fi @@ -566,6 +566,7 @@ 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" if [ -z "$app" ] || [ -s "$url" ]; then @@ -584,8 +585,13 @@ function bes.install () else echo.error "install directory do not exists : ${Cspe}$path" fi + if [ ! -z "$inst" ]; then + if bes.exists "$inst"; then + $inst + fi + fi 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 echo.rs $done } @@ -651,7 +657,7 @@ bes.boot # @date 2017-06-16 04:38:52 CET # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - BES_VERSION=1.2 + BES_VERSION=1.3 BES_NAME="bes-config" BES_URL="https://git.pluie.org/meta-tech/$BES_NAME/raw/latest/dist/$BES_NAME" APP_DIR=$(pwd) diff --git a/src/main.sh b/src/main.sh index 11980cb..9bfe16c 100644 --- a/src/main.sh +++ b/src/main.sh @@ -7,7 +7,7 @@ # @date 2017-06-16 04:38:52 CET # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - BES_VERSION=1.2 + BES_VERSION=1.3 BES_NAME="bes-config" BES_URL="https://git.pluie.org/meta-tech/$BES_NAME/raw/latest/dist/$BES_NAME" APP_DIR=$(pwd)