]> git.pld-linux.org Git - packages/fvwm-themes-base.git/blame - fvwm-themes-base-install-menu-system.sh
- place # SourceN-md5: just after SourceN:
[packages/fvwm-themes-base.git] / fvwm-themes-base-install-menu-system.sh
CommitLineData
d9b5c392
AM
1#!/bin/sh
2# A workaround script so that the rpm can install or not
3# the fvwm themes Debian menu system stuff
4
5DO="$1"
6MY_PWD=/usr/share/fvwm/menu-system
7MM_CONF_DIR=/etc/menu-methods
8WM_SESION_DIR=/etc/X11/wmsession.d
9FILES="fvwm_themes.h fvwm_themes fvwm_themes_data.h"
10
11if test ! -d $MY_PWD; then
12 exit 0
13fi
14
15cd $MY_PWD
16
17if test ! -d /etc/menu-methods -o ! -x /usr/bin/update-menus; then
18 DO=""
19fi
20
21if 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
30elif 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
36fi
37
38# take the occasion to handle the wmsession.d directory
39if test ! -d $WM_SESION_DIR; then
40 exit 0
41fi
42
43if test "x$DO" = "xInstall"; then
44 echo "NAME=fvwm-themes
45DESC=FVWM Themes
46EXEC=/usr/bin/fvwm-themes-start
47SCRIPT:
48if test -x $HOME/.xinitrc-fvwm; then
49 . $HOME/.xinitrc-fvwm
50fi
51exec fvwm-themes-start"> $WM_SESION_DIR/fvwm-themes
52 [ -x /usr/sbin/fndSession ] && /usr/sbin/fndSession || true
53elif test "x$DO" = "xUninstall"; then
54 rm -f $WM_SESION_DIR/fvwm-themes
55 [ -x /usr/sbin/fndSession ] && /usr/sbin/fndSession || true
56fi
57
This page took 0.034452 seconds and 4 git commands to generate.