Update default theme to use features in FVWM 2.5.25+
[fvwm-themes.git] / rpm / install-menu-system.sh
blobf5619c03e16149f4aafd40da48387d8d46a28828
1 #!/bin/sh
2 # A workaround script so that the rpm can install or not
3 # the fvwm themes Debian menu system stuff
5 DO="$1"
6 MY_CWD=/usr/share/fvwm/menu-system
7 MM_CONF_DIR=/etc/menu-methods
8 WM_SESSION_DIR=/etc/X11/wmsession.d
9 FILES="fvwm_themes.h fvwm_themes fvwm_themes_data.h"
11 if test ! -d $MY_CWD; then
12 exit 0
15 cd $MY_CWD
17 if test ! -d /etc/menu-methods -o ! -x /usr/bin/update-menus; then
18 DO=""
21 if test "x$DO" = "xInstall"; then
22 tar xzf rpm-wa.tar.gz
23 for f in $FILES; do
24 cp -f rpm-wa/$f $MM_CONF_DIR/
25 rm -f rpm-wa/$f
26 done
27 chmod +x $MM_CONF_DIR/fvwm_themes
28 rmdir rpm-wa
29 /usr/bin/update-menus
30 elif test "x$DO" = "xUninstall"; then
31 for f in $FILES; do
32 rm -f $MM_CONF_DIR/$f
33 done
34 rm -f ft-menu
35 /usr/bin/update-menus
38 # take the occasion to handle the wmsession.d directory
39 if test ! -d $WM_SESSION_DIR; then
40 exit 0
43 if test "x$DO" = "xInstall"; then
44 echo "NAME=fvwm-themes
45 DESC=FVWM Themes
46 EXEC=/usr/bin/fvwm-themes-start
47 SCRIPT:
48 if test -x $HOME/.xinitrc-fvwm; then
49 . $HOME/.xinitrc-fvwm
51 exec fvwm-themes-start"> $WM_SESSION_DIR/fvwm-themes
52 [ -x /usr/sbin/fndSession ] && /usr/sbin/fndSession || true
53 elif test "x$DO" = "xUninstall"; then
54 rm -f $WM_SESSION_DIR/fvwm-themes
55 [ -x /usr/sbin/fndSession ] && /usr/sbin/fndSession || true