Fix mount

This commit is contained in:
travis134 2022-08-26 15:58:18 -07:00
parent 4f2ef1e3a9
commit 66f579b634
No known key found for this signature in database
GPG key ID: FB8B9EEA5CEF2984

View file

@ -93,10 +93,12 @@ else
do_cleanup() {
if mountpoint -q "$DST_PK3_FILE"; then
umount "$DST_PK3_FILE" &>/dev/null
rm "${DST_PK3_FILE}"
fi
}
if [ ! -e "$DST_PK3_FILE" ]; then
mount --bind "$PK3_FILE" "$DST_PK3_FILE" >/dev/null 2>&1
touch "$DST_PK3_FILE"
mount -o ro,bind "$PK3_FILE" "$DST_PK3_FILE" >/dev/null 2>&1
trap do_cleanup EXIT
fi