mirror of
https://github.com/unraid/webgui.git
synced 2026-05-04 16:59:27 -05:00
chore: optimize file extraction in generate-pr-plugin.sh
- Updated the file extraction method in `generate-pr-plugin.sh` to use a temporary file, improving compatibility and avoiding subshell issues. - Added cleanup for the temporary file after processing the extracted file list.
This commit is contained in:
@@ -90,7 +90,10 @@ echo "Starting file deployment..."
|
||||
# Clear manifest
|
||||
> "$MANIFEST"
|
||||
|
||||
# Extract and get file list - use process substitution to avoid subshell
|
||||
# Extract and get file list - use a temp file to avoid subshell issues
|
||||
tar -tzf "$TARBALL" > /tmp/plugin_files.txt
|
||||
|
||||
# Process each file
|
||||
while IFS= read -r file; do
|
||||
# Skip directories
|
||||
if [[ "$file" == */ ]]; then
|
||||
@@ -110,7 +113,10 @@ while IFS= read -r file; do
|
||||
else
|
||||
echo "$SYSTEM_FILE|NEW" >> "$MANIFEST"
|
||||
fi
|
||||
done < <(tar -tzf "$TARBALL")
|
||||
done < /tmp/plugin_files.txt
|
||||
|
||||
# Clean up temp file
|
||||
rm -f /tmp/plugin_files.txt
|
||||
|
||||
# Extract the tarball to root (files are already prefixed with usr/local/)
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user