We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bc1215 commit 2603149Copy full SHA for 2603149
data/scripts/macos_bundle_libs.sh
@@ -6,7 +6,19 @@ bundle=$3
6
7
rpath=@executable_path/../libs/
8
9
+# check if first 2 bytes is shebang ('#' and '!')
10
+starts_with_shebang() {
11
+ tmpf=${TMPDIR-/tmp}/ug-macos-bundle-sb-check$$
12
+ od -N2 -td1 -An "$1" > "$tmpf"
13
+ read -r first second < "$tmpf"
14
+ rm -f "$tmpf"
15
+ [ "$first" -eq 35 ] && [ "$second" -eq 33 ]
16
+}
17
+
18
for n in "$bundle"/Contents/MacOS/*; do
19
+ if starts_with_shebang "$n"; then
20
+ continue
21
+ fi
22
# shellcheck disable=SC2086 # intentional, even $dylibbundler
23
# can have flags like 'dylibbundler -f'; obvious for _flags
24
echo quit | $dylibbundler $dylibbundler_flags -of -cd -b \
0 commit comments