2014-09-20 11:05:51 +00:00
|
|
|
#!/bin/sh
|
|
|
|
PKG=org.radare.radare2
|
|
|
|
cd /
|
|
|
|
|
|
|
|
pkgutil --files ${PKG} > /dev/null || exit 1
|
|
|
|
|
|
|
|
# delete files
|
2015-06-17 02:59:01 +00:00
|
|
|
FILES="$(pkgutil --only-files --files ${PKG})"
|
2014-09-20 11:05:51 +00:00
|
|
|
for a in ${FILES} ; do
|
2015-06-17 02:59:01 +00:00
|
|
|
if [ -f "${a}" ]; then
|
2014-09-20 11:05:51 +00:00
|
|
|
rm "$a"
|
|
|
|
# | xargs rm -i
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# delete empty directories
|
2015-06-17 02:59:01 +00:00
|
|
|
FILES="$(pkgutil --only-dirs --files ${PKG})"
|
2014-09-20 11:05:51 +00:00
|
|
|
for a in ${FILES} ; do
|
2015-06-17 02:59:01 +00:00
|
|
|
if [ -d "${a}" ]; then
|
2014-09-20 11:05:51 +00:00
|
|
|
rmdir "$a"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
pkgutil --forget ${PKG}
|