Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2019-06-30 00:36:01 +0300
committernachoparker <nacho@ownyourbits.com>2019-06-30 01:22:16 +0300
commit88da901eddff125b3e71d9706fbe02edffc659b3 (patch)
tree92cbaa00b318df3e500d1267c0a6498672c3f5cf /etc
parent2aa28d22a71343e5639b883b8ab9335f55aab4a6 (diff)
ncp-update: fixes on the new step based upgrade systemv1.13.6
Signed-off-by: nachoparker <nacho@ownyourbits.com>
Diffstat (limited to 'etc')
-rw-r--r--etc/library.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/library.sh b/etc/library.sh
index ca73142f..d2ec12b6 100644
--- a/etc/library.sh
+++ b/etc/library.sh
@@ -92,7 +92,7 @@ function configure_app()
function run_app()
{
local ncp_app=$1
- local script="$(find "$BINDIR" -name $ncp_app.sh)"
+ local script="$(find "$BINDIR" -name $ncp_app.sh | head -1)"
[[ -f "$script" ]] || { echo "file $script not found"; return 1; }
@@ -147,7 +147,7 @@ function is_active_app()
local script="$bin_dir/$ncp_app.sh"
local cfg_file="$CFGDIR/$ncp_app.cfg"
- [[ -f "$script" ]] || local script="$(find "$BINDIR" -name $ncp_app.sh)"
+ [[ -f "$script" ]] || local script="$(find "$BINDIR" -name $ncp_app.sh | head -1)"
[[ -f "$script" ]] || { echo "file $script not found"; return 1; }
# function
@@ -194,7 +194,7 @@ function install_app()
local script="$ncp_app"
local ncp_app="$(basename "$script" .sh)"
else
- local script="$(find "$BINDIR" -name $ncp_app.sh)"
+ local script="$(find "$BINDIR" -name $ncp_app.sh | head -1)"
fi
# do it
@@ -234,7 +234,7 @@ function is_more_recent_than()
{
local version_A="$1"
local version_B="$2"
-
+
local major_a=$( cut -d. -f1 <<<"$version_A" )
local minor_a=$( cut -d. -f2 <<<"$version_A" )
local patch_a=$( cut -d. -f3 <<<"$version_A" )
@@ -250,7 +250,7 @@ function is_more_recent_than()
return 1
elif [ "$major_b" -eq "$major_a" ] && [ "$minor_b" -gt "$minor_a" ]; then
return 1
- elif [ "$major_b" -eq "$major_a" ] && [ "$minor_b" -eq "$minor_a" ] && [ "$patch_b" -gt "$patch_a" ]; then
+ elif [ "$major_b" -eq "$major_a" ] && [ "$minor_b" -eq "$minor_a" ] && [ "$patch_b" -ge "$patch_a" ]; then
return 1
fi