summaryrefslogtreecommitdiff
path: root/debian/llvm-X.Y-runtime.prerm.in
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-10-15 15:41:01 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-10-15 15:41:01 +0300
commit7a2b43796a4c38cf98fe05e8e4ec985318b2721b (patch)
treeb0f5611276e10646b654f7d5ed12c6e6060353be /debian/llvm-X.Y-runtime.prerm.in
downloadllvm-toolchain-5.0-debian.tar.gz
Imported llvm-toolchain-5.0 (1:5.0-4)debian/5.0-4debian
Diffstat (limited to 'debian/llvm-X.Y-runtime.prerm.in')
-rw-r--r--debian/llvm-X.Y-runtime.prerm.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/debian/llvm-X.Y-runtime.prerm.in b/debian/llvm-X.Y-runtime.prerm.in
new file mode 100644
index 0000000..3f16015
--- /dev/null
+++ b/debian/llvm-X.Y-runtime.prerm.in
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+if test "$1" = "remove"; then
+ if test -x /usr/sbin/update-binfmts; then
+ update-binfmts --package llvm-@LLVM_VERSION@-runtime \
+ --remove llvm-@LLVM_VERSION@-runtime.binfmt /usr/bin/lli-@LLVM_VERSION@ || true
+ if test -f /var/lib/binfmts/llvm-@LLVM_VERSION@.binfmt; then
+ # Purge old file
+ update-binfmts --package llvm-@LLVM_VERSION@-runtime \
+ --remove llvm-@LLVM_VERSION@.binfmt /usr/bin/lli-@LLVM_VERSION@ || true
+ fi
+ fi
+fi
+
+#DEBHELPER#
+