forked from Bitmessage/sysdeploy
fix: detecting version files
This commit is contained in:
parent
a4a3250aa7
commit
22d48e13bc
|
@ -31,7 +31,7 @@ function update_syslinux_menu()
|
|||
versions["$version"]=1
|
||||
missing=""
|
||||
for f in "${files[@]}"; do
|
||||
if [ ! -e "$mnt"/"$imagepath"/"$f""$version" ]; then
|
||||
if [ ! -e "$mnt""$imagepath"/"$f""$version" ]; then
|
||||
missing="1"
|
||||
fi
|
||||
done
|
||||
|
@ -49,8 +49,8 @@ _EOL_
|
|||
|
||||
# find expired
|
||||
for f in "${files[@]}"; do
|
||||
for i in "$mnt"/"$imagepath"/"$f"*; do
|
||||
version="$(basename "$i"|cut -d_ -f2-)"
|
||||
for i in "$mnt""$imagepath"/"$f"*; do
|
||||
version="$(basename "$i"|cut -d. -f2-)"
|
||||
if [ -z "${versions[$version]}" ]; then
|
||||
rm -f $i
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user