forked from Lainports/opnsense-ports
Taken from: https://github.com/freebsd/freebsd-ports.git Commit id: 5070672073b68be364139bc6b3a89100bd17d331
30 lines
556 B
Bash
30 lines
556 B
Bash
#! /bin/sh
|
|
|
|
case $2 in
|
|
POST-DEINSTALL)
|
|
if [ -n "${PACKAGE_BUILDING}" ]; then
|
|
return 0
|
|
fi
|
|
if [ -d %%TWCFG%% -o -d %%TWDB%% ]; then
|
|
unset ANS
|
|
echo
|
|
while [ -z "$ANS" ]; do
|
|
echo If permanently deleting this package,
|
|
echo %%TWCFG%% and %%TWDB%% may be removed.
|
|
echo Do you wish to delete %%TWCFG%%
|
|
echo -n and %%TWDB%%? '(yes/no) -: '
|
|
read ANS
|
|
case $ANS in
|
|
[Yy]|[Yy][Ee][Ss])
|
|
rm -rf %%TWCFG%% %%TWDB%%
|
|
;;
|
|
[Nn]|[Nn][Oo])
|
|
;;
|
|
*) echo Answer must be yes or no.
|
|
echo
|
|
unset ANS
|
|
;;
|
|
esac
|
|
done
|
|
fi
|
|
esac
|