| 1 |
#! /bin/sh |
| 2 |
# postinst script for chameleon-cursor-theme |
| 3 |
# (based on postinst of comixcursors by Sune Vuorela) |
| 4 |
|
| 5 |
set -e |
| 6 |
|
| 7 |
TARGET=/usr/share/icons/default/index.theme |
| 8 |
ICONDIR=/usr/share/icons |
| 9 |
CHOSEN=Chameleon-Pearl-Large/cursor.theme |
| 10 |
PRIORITY1=50 |
| 11 |
PRIORITY2=49 |
| 12 |
|
| 13 |
case "$1" in |
| 14 |
configure) |
| 15 |
for theme in `find "$ICONDIR" -regex '.*Chameleon-\(Anthracite\|DarkSkyBlue\|Pearl\|White\|SkyBlue\|Mint\|Purple\)-.*theme$'`; do |
| 16 |
if [ "$theme" = "$ICONDIR/$CHOSEN" ];then |
| 17 |
update-alternatives --install "$TARGET" x-cursor-theme "$theme" $PRIORITY1 |
| 18 |
else |
| 19 |
update-alternatives --install "$TARGET" x-cursor-theme "$theme" $PRIORITY2 |
| 20 |
fi |
| 21 |
done |
| 22 |
;; |
| 23 |
|
| 24 |
abort-upgrade|abort-remove|abort-deconfigure) |
| 25 |
|
| 26 |
;; |
| 27 |
|
| 28 |
*) |
| 29 |
echo "postinst called with unknown argument \`$1'" >&2 |
| 30 |
exit 1 |
| 31 |
;; |
| 32 |
esac |
| 33 |
|
| 34 |
#DEBHELPER# |
| 35 |
|
| 36 |
exit 0 |