kdeplasma-addons.install 2.17 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
post_install() {
		if [ -e "/etc/chakra/updates.conf" ] ; then

			. /etc/chakra/updates.conf

			if [ "$UPDATE_XDG_ICON_DB" = "yes" ]; then
				/usr/bin/chakra-update-icons
			fi

			if [ "$UPDATE_GLOBAL_CONFIG" = "yes" ]; then
				/usr/bin/chakra-update-sycoca
			fi

			if [ "$UPDATE_USER_CONFIG" = "yes" ]; then
				/usr/bin/chakra-update-user-sycoca
			fi
		else
			echo " > WARNING"
totte's avatar
totte committed
19
			echo "   The package chakra-common seems not to be installed,"
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
			echo "   this can possibly break the installation. Just install it"
			echo "   manually after this installation/update, run the following"
			echo "   commands and restart KDE afterwards:"
			echo "   sudo chakra-config-updater"
			echo "   kbuildsycoca4"
			echo " "
		fi
}

post_upgrade() {
		if [ -e "/etc/chakra/updates.conf" ] ; then

			. /etc/chakra/updates.conf

			if [ "$UPDATE_XDG_ICON_DB" = "yes" ]; then
				/usr/bin/chakra-update-icons
			fi

			if [ "$UPDATE_GLOBAL_CONFIG" = "yes" ]; then
				/usr/bin/chakra-update-sycoca
			fi

			if [ "$UPDATE_USER_CONFIG" = "yes" ]; then
				/usr/bin/chakra-update-user-sycoca
			fi
		else
			echo " > WARNING"
totte's avatar
totte committed
47
			echo "   The package chakra-common seems not to be installed,"
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
			echo "   this can possibly break the installation. Just install it"
			echo "   manually after this installation/update, run the following"
			echo "   commands and restart KDE afterwards:"
			echo "   sudo chakra-config-updater"
			echo "   kbuildsycoca4"
			echo " "
		fi
}

post_remove() {
		if [ -e "/etc/chakra/updates.conf" ] ; then

			. /etc/chakra/updates.conf

			if [ "$UPDATE_XDG_ICON_DB" = "yes" ]; then
				/usr/bin/chakra-update-icons
			fi

			if [ "$UPDATE_GLOBAL_CONFIG" = "yes" ]; then
				/usr/bin/chakra-update-sycoca
			fi

			if [ "$UPDATE_USER_CONFIG" = "yes" ]; then
				/usr/bin/chakra-update-user-sycoca
			fi
		else
			echo " > WARNING"
totte's avatar
totte committed
75
			echo "   The package chakra-common seems not to be installed,"
76 77 78 79 80 81 82 83 84 85 86 87 88
			echo "   this can possibly break the installation. Just install it"
			echo "   manually after this installation/update, run the following"
			echo "   commands and restart KDE afterwards:"
			echo "   sudo chakra-config-updater"
			echo "   kbuildsycoca4"
			echo " "
		fi
}

op=$1
shift

$op $*