]>
Commit | Line | Data |
---|---|---|
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 | ||
5 | DO="$1" | |
6 | MY_PWD=/usr/share/fvwm/menu-system | |
7 | MM_CONF_DIR=/etc/menu-methods | |
8 | WM_SESION_DIR=/etc/X11/wmsession.d | |
9 | FILES="fvwm_themes.h fvwm_themes fvwm_themes_data.h" | |
10 | ||
11 | if test ! -d $MY_PWD; then | |
12 | exit 0 | |
13 | fi | |
14 | ||
15 | cd $MY_PWD | |
16 | ||
17 | if test ! -d /etc/menu-methods -o ! -x /usr/bin/update-menus; then | |
18 | DO="" | |
19 | fi | |
20 | ||
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 | |
36 | fi | |
37 | ||
38 | # take the occasion to handle the wmsession.d directory | |
39 | if test ! -d $WM_SESION_DIR; then | |
40 | exit 0 | |
41 | fi | |
42 | ||
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 | |
50 | fi | |
51 | exec fvwm-themes-start"> $WM_SESION_DIR/fvwm-themes | |
52 | [ -x /usr/sbin/fndSession ] && /usr/sbin/fndSession || true | |
53 | elif test "x$DO" = "xUninstall"; then | |
54 | rm -f $WM_SESION_DIR/fvwm-themes | |
55 | [ -x /usr/sbin/fndSession ] && /usr/sbin/fndSession || true | |
56 | fi | |
57 |