mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
Include the Linux bin command in the main dir
This also changes the behavior of the bin command to find cli.js relatively, meaning the CLI now supports non-standard install locations.
This commit is contained in:
@@ -3,9 +3,19 @@
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
NAME="@@NAME@@"
|
||||
VSCODE_PATH="/usr/share/$NAME"
|
||||
ELECTRON="$VSCODE_PATH/$NAME"
|
||||
if [ ! -L $0 ]; then
|
||||
# if path is not a symlink, find relatively
|
||||
VSCODE_PATH="$(dirname $0)/.."
|
||||
else
|
||||
if which readlink >/dev/null; then
|
||||
# if readlink exists, follow the symlink and find relatively
|
||||
VSCODE_PATH="$(dirname $(readlink $0))/.."
|
||||
else
|
||||
# else use the standard install location
|
||||
VSCODE_PATH="/usr/share/@@NAME@@"
|
||||
fi
|
||||
fi
|
||||
ELECTRON="$VSCODE_PATH/@@NAME@@"
|
||||
CLI="$VSCODE_PATH/resources/app/out/cli.js"
|
||||
ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
|
||||
exit $?
|
||||
exit $?
|
||||
Reference in New Issue
Block a user