radare2/sys/osx-pkg-uninstall.sh

24 lines
392 B
Bash
Raw Normal View History

#!/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})"
for a in ${FILES} ; do
2015-06-17 02:59:01 +00:00
if [ -f "${a}" ]; then
rm "$a"
# | xargs rm -i
fi
done
# delete empty directories
2015-06-17 02:59:01 +00:00
FILES="$(pkgutil --only-dirs --files ${PKG})"
for a in ${FILES} ; do
2015-06-17 02:59:01 +00:00
if [ -d "${a}" ]; then
rmdir "$a"
fi
done
pkgutil --forget ${PKG}