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:
Eli Bosley
2025-09-10 12:11:50 -04:00
parent 805b50737c
commit 72682d1812
+8 -2
View File
@@ -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 ""