提交 572be7e5 编写于 作者: D Daniel Imms

Register code to the Debian alternatives system

Fixes #3541
上级 2212fbbb
......@@ -289,7 +289,11 @@ function prepareDebPackage(arch) {
.pipe(es.through(function (f) { that.emit('data', f); }, function () { that.emit('end'); }));
}));
var all = es.merge(control, desktop, icon, shortcut, code);
var prerm = gulp.src('resources/linux/debian/prerm.template', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(rename('DEBIAN/prerm'))
var all = es.merge(control, prerm, desktop, icon, shortcut, code);
// Register an apt repository if this is an official build
if (product.updateUrl && product.quality) {
......@@ -300,6 +304,11 @@ function prepareDebPackage(arch) {
.pipe(replace('@@ARCHITECTURE@@', debArch))
.pipe(rename('DEBIAN/postinst'))
all = es.merge(all, postinst);
} else {
var postinst = gulp.src('resources/linux/debian/postinst.oss.template', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(rename('DEBIAN/postinst'))
all = es.merge(all, postinst);
}
return all
......
#!/usr/bin/env bash
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Register code in the alternatives system
# Priority of 0 should never make code the default editor in auto mode as most
# developers would prefer a terminal editor as the default.
update-alternatives --install /usr/bin/editor editor /usr/bin/@@NAME@@ 0
......@@ -3,6 +3,12 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Register code in the alternatives system
# Priority of 0 should never make code the default editor in auto mode as most
# developers would prefer a terminal editor as the default.
update-alternatives --install /usr/bin/editor editor /usr/bin/@@NAME@@ 0
# Register repository as an apt source
get_apt_config_value() {
echo $(apt-config dump | grep "$1 " | sed -e "s/$1 \"//" -e "s/\";$//")
}
......
#!/usr/bin/env bash
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Deregister code from the alternatives system
update-alternatives --remove editor /usr/bin/@@NAME@@
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册