From 36d92ddeb071750c4e9b4ab259f3a9fe86958d64 Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Thu, 15 Dec 2022 00:24:59 -0700 Subject: [PATCH] only print first 4 numbers of version --- functions/misc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/misc.sh b/functions/misc.sh index c14576d0..66b93410 100644 --- a/functions/misc.sh +++ b/functions/misc.sh @@ -18,8 +18,8 @@ export -f sync prune(){ echo -e "🄿 🅁 🅄 🄽 🄴" -version="$(cli -c 'system version' | awk -F '-' '{print $3}' | tr -d " \t\r\.")" -if (( "$version" >= 22120 )); then +version="$(cli -c 'system version' | awk -F '-' '{print $3}' | awk -F '.' '{print $1 $2}' | tr -d " \t\r\.")" +if (( "$version" >= 2212 )); then if ! cli -c 'app container config prune prune_options={"remove_unused_images": true, "remove_stopped_containers": true}' | head -n -4; then echo "Failed to Prune Docker Images" fi