diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 532a059f5e4..2be526d67a4 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -296,6 +296,10 @@ function prepareDebPackage(arch) { .pipe(replace('@@NAME@@', product.applicationName)) .pipe(rename('DEBIAN/prerm')) + var postrm = gulp.src('resources/linux/debian/postrm.template', { base: '.' }) + .pipe(replace('@@NAME@@', product.applicationName)) + .pipe(rename('DEBIAN/postrm')) + var postinst = gulp.src('resources/linux/debian/postinst.template', { base: '.' }) .pipe(replace('@@NAME@@', product.applicationName)) .pipe(replace('@@ARCHITECTURE@@', debArch)) @@ -303,7 +307,7 @@ function prepareDebPackage(arch) { .pipe(replace('@@UPDATEURL@@', product.updateUrl || '@@UPDATEURL@@')) .pipe(rename('DEBIAN/postinst')) - var all = es.merge(control, postinst, prerm, desktop, icon, code); + var all = es.merge(control, postinst, postrm, prerm, desktop, icon, code); return all.pipe(symdest(destination)); }; diff --git a/resources/linux/debian/postrm.template b/resources/linux/debian/postrm.template new file mode 100755 index 00000000000..1dfa892a0ea --- /dev/null +++ b/resources/linux/debian/postrm.template @@ -0,0 +1,6 @@ +#!/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. + +rm -f /usr/bin/@@NAME@@ \ No newline at end of file