Skip to content

Commit c5a3407

Browse files
Check if file is ELF before patchelf call
Signed-off-by: Patrick José Pereira <[email protected]> Co-authored-by: TheAssassin <[email protected]>
1 parent 1f20246 commit c5a3407

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

linuxdeploy-plugin-gstreamer.sh

+2
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ done
107107
for i in "$plugins_target_dir"/*; do
108108
[ -d "$i" ] && continue
109109
[ ! -f "$i" ] && echo "File does not exist: $i" && continue
110+
"$(file "$i" | grep -v ELF --silent)" && echo "Ignoring non ELF file: $i" && continue
110111

111112
echo "Manually setting rpath for $i"
112113
patchelf --set-rpath '$ORIGIN/..:$ORIGIN' "$i"
@@ -126,6 +127,7 @@ done
126127
for i in "$helpers_target_dir"/*; do
127128
[ -d "$i" ] && continue
128129
[ ! -f "$i" ] && echo "File does not exist: $i" && continue
130+
"$(file "$i" | grep -v ELF --silent)" && echo "Ignoring non ELF file: $i" && continue
129131

130132
echo "Manually setting rpath for $i"
131133
patchelf --set-rpath '$ORIGIN/../..' "$i"

0 commit comments

Comments
 (0)