Skip to content

Commit ccea38a

Browse files
committed
something about fixing the archive unpacker again
1 parent 26554bb commit ccea38a

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

static/System/starts/1-archive-unpacker.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,9 @@
33
. /mnt/SDCARD/System/scripts/helpers.sh
44

55
ARCHIVES_FOLDER="/mnt/SDCARD/System/archives"
6-
ARCHIVES="$(find "$ARCHIVES_FOLDER" -type f -iname "*.zip")"
7-
ARCHIVE_COUNT="$(printf "$ARCHIVES" | wc -l)"
86
ARCHIVE_UNPACK_LOG="/mnt/SDCARD/System/log/archive_unpack.log"
97

10-
log_message "Unpacker: $ARCHIVE_COUNT archives found" "$ARCHIVE_UNPACK_LOG"
11-
12-
if [ "$ARCHIVE_COUNT" -eq 0 ]; then
13-
log_message "Unpacker: no archives to unpack" "$ARCHIVE_UNPACK_LOG"
14-
exit 0
15-
fi
16-
17-
echo "$ARCHIVES" | while IFS= read -r archive; do
8+
find "$ARCHIVES_FOLDER" -type f -iname "*.zip" | while read -r archive; do
189
basename="$(basename "$archive")"
1910
log_message "Unpacker: unpacking archive $basename"
2011
display -t "Unpacking $basename"

0 commit comments

Comments
 (0)