mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Use reallink for all server cli scripts
This commit is contained in:
parent
ee0c8c4f01
commit
465cac2c42
|
@ -311,13 +311,13 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
|
|||
);
|
||||
} else if (platform === 'linux' || platform === 'alpine' || platform === 'darwin') {
|
||||
result = es.merge(result,
|
||||
gulp.src('resources/server/bin/remote-cli/code.sh', { base: '.' })
|
||||
gulp.src(`resources/server/bin/remote-cli/${platform === 'darwin' ? 'code-darwin.sh' : 'code-linux.sh'}`, { base: '.' })
|
||||
.pipe(replace('@@VERSION@@', version))
|
||||
.pipe(replace('@@COMMIT@@', commit))
|
||||
.pipe(replace('@@APPNAME@@', product.applicationName))
|
||||
.pipe(rename(`bin/remote-cli/${product.applicationName}`))
|
||||
.pipe(util.setExecutableBit()),
|
||||
gulp.src('resources/server/bin/helpers/browser.sh', { base: '.' })
|
||||
gulp.src(`resources/server/bin/helpers/${platform === 'darwin' ? 'browser-darwin.sh' : 'browser-linux.sh'}`, { base: '.' })
|
||||
.pipe(replace('@@VERSION@@', version))
|
||||
.pipe(replace('@@COMMIT@@', commit))
|
||||
.pipe(replace('@@APPNAME@@', product.applicationName))
|
||||
|
|
22
resources/server/bin/helpers/browser-darwin.sh
Normal file
22
resources/server/bin/helpers/browser-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" "--openExternal" "$@"
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
#
|
||||
ROOT=$(dirname "$(dirname "$(dirname "$0")")")
|
||||
ROOT="$(dirname "$(dirname "$(readlink -f "$0")")")"
|
||||
|
||||
APP_NAME="@@APPNAME@@"
|
||||
VERSION="@@VERSION@@"
|
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" "$@"
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
#
|
||||
ROOT=$(dirname "$(dirname "$(dirname "$0")")")
|
||||
ROOT="$(dirname "$(dirname "$(readlink -f "$0")")")"
|
||||
|
||||
APP_NAME="@@APPNAME@@"
|
||||
VERSION="@@VERSION@@"
|
Loading…
Reference in a new issue