debian: libwiringpi2: Remove previous built header files after installing
To make sure avoiding conflicts with legacy files. Signed-off-by: Yang Deokgyu <secugyu@gmail.com> Change-Id: I6c2ef994ce0b4c76603c89f76091d7cf8cfdca5e
This commit is contained in:
26
debian/libwiringpi2.postinst
vendored
Normal file
26
debian/libwiringpi2.postinst
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
msg() {
|
||||
echo "libwiringpi2: $1"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
if [ $(ls -l /usr/local/include/wiring*.h 2> /dev/null | wc -l) -gt 0 ]; then
|
||||
msg "Remove previous built header files in /usr/local/include ..."
|
||||
rm -rf /usr/local/include/wiring*.h
|
||||
fi
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user