bddef2485f
OpenSCToken (https://github.com/frankmorgner/OpenSCToken) is now a standalone package that provides the CryptoTokenKit app extension. It includes its own 'build-package' script, which handles building the OpenSC library and statically linking against it. The 'MacOSX/' directory in OpenSC itself is only used to build the macOS tokend. Remove unused code for building a CryptoTokenKit app extension from this directory (which no longer works). This should help to avoid confusion when building OpenSC for macOS.
32 lines
926 B
Bash
Executable File
32 lines
926 B
Bash
Executable File
#!/bin/bash
|
|
if [ "$(id -u)" != "0" ]; then
|
|
echo "This script must be run as root:" 1>&2
|
|
echo "" 1>&2
|
|
echo "sudo /usr/local/bin/opensc-uninstall" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
# Remove symlinks to commands
|
|
for file in /Library/OpenSC/bin/*; do
|
|
test -L "/usr/local/bin/$(basename $file)" && rm -f "/usr/local/bin/$(basename $file)"
|
|
done
|
|
|
|
# Remove pkcs11 libraries
|
|
rm -f /usr/local/lib/opensc-pkcs11.so
|
|
rm -f /usr/local/lib/onepin-opensc-pkcs11.so
|
|
|
|
# Remove installed files
|
|
rm -rf "/Applications/OpenSC Notify.app"
|
|
rm -rf /Library/OpenSC
|
|
rm -rf /Library/Security/tokend/OpenSC.tokend
|
|
rm -rf /System/Library/Security/tokend/OpenSC.tokend
|
|
|
|
# delete receipts on 10.6+
|
|
for file in /var/db/receipts/org.opensc-project.mac.bom /var/db/receipts/org.opensc-project.mac.plist; do
|
|
test -f $file && rm -f $file
|
|
done
|
|
|
|
# remove this script
|
|
rm -f /usr/local/bin/opensc-uninstall
|
|
echo "OpenSC has been removed from your system. See you again!"
|