mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
code server scripts: use realpath
This commit is contained in:
parent
d971263085
commit
884273e35b
|
@ -329,7 +329,7 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
|
|||
.pipe(replace('@@APPNAME@@', product.applicationName))
|
||||
.pipe(rename(`bin/helpers/browser.sh`))
|
||||
.pipe(util.setExecutableBit()),
|
||||
gulp.src('resources/server/bin/code-server.sh', { base: '.' })
|
||||
gulp.src(`resources/server/bin/${platform === 'darwin' ? 'code-server-darwin.sh' : 'code-server-linux.sh'}`, { base: '.' })
|
||||
.pipe(rename(`bin/${product.serverApplicationName}`))
|
||||
.pipe(util.setExecutableBit())
|
||||
);
|
||||
|
|
13
resources/server/bin/code-server-darwin.sh
Normal file
13
resources/server/bin/code-server-darwin.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env sh
|
||||
#
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
#
|
||||
|
||||
case "$1" in
|
||||
--inspect*) INSPECT="$1"; shift;;
|
||||
esac
|
||||
|
||||
function realpath() { python -c "import os,sys; print(os.path.realpath(sys.argv[1]))" "$0"; }
|
||||
ROOT=$(dirname $(dirname $(realpath "$0")))
|
||||
|
||||
"$ROOT/node" ${INSPECT:-} "$ROOT/out/server-main.js" "$@"
|
|
@ -7,6 +7,6 @@ case "$1" in
|
|||
--inspect*) INSPECT="$1"; shift;;
|
||||
esac
|
||||
|
||||
ROOT=$(dirname "$(dirname "$0")")
|
||||
ROOT=$(dirname $(dirname $(readlink -f $0)))
|
||||
|
||||
"$ROOT/node" ${INSPECT:-} "$ROOT/out/server-main.js" "$@"
|
Loading…
Reference in a new issue