diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2012-11-02 17:12:08 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2012-11-02 17:12:08 +0000 |
commit | ea1e79cd5a1705b5f5678e2c1390c33135ca39ad (patch) | |
tree | 702fa9c82ea71a2dfc619a576923c02e47581c1c /java/javavmwrapper | |
parent | 3feab1e64ec6bec0d14337b65946d1a0024d0189 (diff) |
Fix deinstallation script for 7.x. -samefile option for find(1) does not
exist there.
Reviewed by: glewis (maintainer)
Feature safe: yes
Notes
Notes:
svn path=/head/; revision=306872
Diffstat (limited to 'java/javavmwrapper')
-rw-r--r-- | java/javavmwrapper/Makefile | 2 | ||||
-rw-r--r-- | java/javavmwrapper/pkg-deinstall | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/java/javavmwrapper/Makefile b/java/javavmwrapper/Makefile index 77d6450b46ec..749aaeeb63fb 100644 --- a/java/javavmwrapper/Makefile +++ b/java/javavmwrapper/Makefile @@ -5,7 +5,7 @@ PORTNAME= javavmwrapper PORTVERSION= 2.4 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= java MASTER_SITES= # none DISTFILES= # none diff --git a/java/javavmwrapper/pkg-deinstall b/java/javavmwrapper/pkg-deinstall index fd351f3b8246..2885415997c2 100644 --- a/java/javavmwrapper/pkg-deinstall +++ b/java/javavmwrapper/pkg-deinstall @@ -22,9 +22,17 @@ if [ -f "${OPTION_CONF}" -a -f "${OPTION_CONF}.dist" ]; then fi # Destroy the symbolic links that were created for every executable for a VM. -find -L ${PKG_PREFIX}/bin -samefile ${PKG_PREFIX}/bin/javavm \ - \! -name checkvms \! -name javavm \! -name manvm \ - \! -name registervm \! -name unregistervm | xargs rm -f +_excl_links='checkvms manvm registervm unregistervm' +_find_expr='-depth 1 -type l' +for i in ${_excl_links}; do + _find_expr="${_find_expr} ! -name ${i}" +done +_javavm_path=`realpath ${PKG_PREFIX}/bin/javavm` +for i in `find ${PKG_PREFIX}/bin ${_find_expr}`; do + if [ "${_javavm_path}" = `realpath ${i}` ]; then + rm -f "${i}" + fi +done # The configuration file CONF="${PKG_PREFIX}/etc/javavms" |