only print first 4 numbers of version
This commit is contained in:
parent
a3c052dce6
commit
36d92ddeb0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user