mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
Use reallink for all server cli scripts
This commit is contained in:
22
resources/server/bin/remote-cli/code-darwin.sh
Normal file
22
resources/server/bin/remote-cli/code-darwin.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env sh
|
||||
#
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
#
|
||||
realdir() {
|
||||
SOURCE=$1
|
||||
while [ -h "$SOURCE" ]; do
|
||||
DIR=$(dirname "$SOURCE")
|
||||
SOURCE=$(readlink "$SOURCE")
|
||||
[[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE
|
||||
done
|
||||
echo "$( cd -P "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd )"
|
||||
}
|
||||
|
||||
ROOT=$(dirname "$(realdir "$0")")
|
||||
|
||||
APP_NAME="@@APPNAME@@"
|
||||
VERSION="@@VERSION@@"
|
||||
COMMIT="@@COMMIT@@"
|
||||
EXEC_NAME="@@APPNAME@@"
|
||||
CLI_SCRIPT="$ROOT/out/server-cli.js"
|
||||
"$ROOT/node" "$CLI_SCRIPT" "$APP_NAME" "$VERSION" "$COMMIT" "$EXEC_NAME" "$@"
|
||||
Reference in New Issue
Block a user