Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify postinst and prerm of matlab package
- Loading branch information
Showing
2 changed files
with
15 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
for m in /usr/lib/spm8/*.mex?*; do | ||
mbase=$(basename $m) | ||
# remove symlink | ||
rm -f /usr/share/spm8/$mbase | ||
# and actual file | ||
rm -f /usr/lib/spm8/$mbase | ||
done | ||
|
||
# try removing the libdir, but don't fail if not empty | ||
rmdir --ignore-fail-on-non-empty /usr/lib/spm8 | ||
case "$1" in | ||
remove|upgrade|deconfigure) | ||
debian-matlab-mexhelper spm8 clean | ||
;; | ||
|
||
failed-upgrade) | ||
;; | ||
|
||
*) | ||
echo "prerm called with unknown argument \`$1'" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
#DEBHELPER# |