update upgrade script

This commit is contained in:
2022-05-05 17:59:55 +01:00
parent ad72573024
commit 8844047368

10
exa.plg
View File

@@ -23,7 +23,15 @@
<FILE Run="/bin/bash"> <FILE Run="/bin/bash">
<INLINE> <INLINE>
rm -f $(ls /boot/config/plugins/&name;/&name;*.txz 2>/dev/null | grep -v '&version;') <!-- remove previous version if present -->
file=$(/usr/bin/ls /boot/config/plugins/&name;/&name;*.txz | grep -v '&version;')
if [ ! -z "$file" ]
then
filename=$(basename -- $file)
previous="${filename%.*}"
removepkg $previous
rm -f $file
fi
</INLINE> </INLINE>
</FILE> </FILE>