File tree 2 files changed +17
-4
lines changed
2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ main() {
20
20
if [[ $OS == " linux" ]]; then
21
21
bundle_dynamic_lib libstdc++
22
22
bundle_dynamic_lib libgcc_s
23
+ elif [[ $OS == " macos" ]]; then
24
+ bundle_dynamic_lib libicui18n
25
+ bundle_dynamic_lib libicuuc
26
+ bundle_dynamic_lib libicudata
23
27
fi
24
28
25
29
ln -s " ./bin/code-server" " $RELEASE_PATH /code-server"
@@ -31,9 +35,14 @@ main() {
31
35
32
36
bundle_dynamic_lib () {
33
37
lib_name=" $1 "
34
- lib_path=" $( ldd " $RELEASE_PATH /lib/node" | grep " $lib_name " | awk ' {print $3 }' ) "
35
38
36
- cp " $lib_path " " $RELEASE_PATH /lib/"
39
+ if [[ $OS == " linux" ]]; then
40
+ lib_path=" $( ldd " $RELEASE_PATH /lib/node" | grep " $lib_name " | awk ' {print $3 }' ) "
41
+ elif [[ $OS == " macos" ]]; then
42
+ lib_path=" $( otool -L " $RELEASE_PATH /lib/node" | grep " $lib_name " | awk ' {print $1 }' ) "
43
+ fi
44
+
45
+ cp " $lib_path " " $RELEASE_PATH /lib"
37
46
}
38
47
39
48
main " $@ "
Original file line number Diff line number Diff line change 1
- #! /usr/ bin/env sh
1
+ #! /bin/sh
2
2
3
3
# This script is intended to be bundled into the static releases.
4
4
# Runs code-server with the bundled Node binary.
@@ -17,5 +17,9 @@ bin_dir() {
17
17
}
18
18
19
19
BIN_DIR=$( bin_dir)
20
- export LD_LIBRARY_PATH=" $BIN_DIR /../lib${LD_LIBRARY_PATH+: $LD_LIBRARY_PATH } "
20
+ if [ " $( uname) " = " Linux" ]; then
21
+ export LD_LIBRARY_PATH=" $BIN_DIR /../lib${LD_LIBRARY_PATH+: $LD_LIBRARY_PATH } "
22
+ else
23
+ export DYLD_LIBRARY_PATH=" $BIN_DIR /../lib${LD_LIBRARY_PATH+: $LD_LIBRARY_PATH } "
24
+ fi
21
25
exec " $BIN_DIR /../lib/node" " $BIN_DIR /.." " $@ "
You can’t perform that action at this time.
0 commit comments