From 3c2ce3203c51c816e7c3410a9887b33509db9b1c Mon Sep 17 00:00:00 2001 From: a-Sansara Date: Thu, 28 Feb 2019 01:16:38 +0100 Subject: [PATCH] add possibility to module to do extra install instructions --- bes.ini | 2 +- src/install.sh | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bes.ini b/bes.ini index 0716525..72976f7 100644 --- a/bes.ini +++ b/bes.ini @@ -1,7 +1,7 @@ [project] vendor = bes name = install -version = 1.2 +version = 1.3 license = "GNU GPL v3" author = a-Sansara type = library diff --git a/src/install.sh b/src/install.sh index 2c90c7a..60cd6b1 100644 --- a/src/install.sh +++ b/src/install.sh @@ -12,6 +12,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 @@ -30,8 +31,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 }