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
|
versions["$version"]=1
|
||||||
missing=""
|
missing=""
|
||||||
for f in "${files[@]}"; do
|
for f in "${files[@]}"; do
|
||||||
if [ ! -e "$mnt"/"$imagepath"/"$f""$version" ]; then
|
if [ ! -e "$mnt""$imagepath"/"$f""$version" ]; then
|
||||||
missing="1"
|
missing="1"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -49,8 +49,8 @@ _EOL_
|
||||||
|
|
||||||
# find expired
|
# find expired
|
||||||
for f in "${files[@]}"; do
|
for f in "${files[@]}"; do
|
||||||
for i in "$mnt"/"$imagepath"/"$f"*; do
|
for i in "$mnt""$imagepath"/"$f"*; do
|
||||||
version="$(basename "$i"|cut -d_ -f2-)"
|
version="$(basename "$i"|cut -d. -f2-)"
|
||||||
if [ -z "${versions[$version]}" ]; then
|
if [ -z "${versions[$version]}" ]; then
|
||||||
rm -f $i
|
rm -f $i
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user