File: postinst

package info (click to toggle)
lyx 1.1.6fix4-2
  • links: PTS
  • area: contrib
  • in suites: woody
  • size: 26,136 kB
  • ctags: 13,679
  • sloc: cpp: 93,591; sh: 9,563; ansic: 8,253; perl: 3,489; makefile: 1,332; tcl: 163; sed: 150; python: 112; yacc: 38
file content (69 lines) | stat: -rw-r--r-- 1,224 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh

set -e

# Make sure we should be running...
case "$1" in
    configure)
        # continue below
        ;;
    abort-upgrade|abort-remove|abort-deconfigure)
        exit 0
        ;;
    *)
        echo "postinst called with unknown argument \$1" >&2
        exit 0
        ;;
esac

#
# clean up old conffile
#
if [ -f /etc/lyx/system.lyxrc ]
then
	cat << EOF

You still have the old configuartion file /etc/lyx/system.lyxrc on your
system. This file is useless for the newer releases of lyx since name,
location and format of the configuartion file has changed.

EOF

	while true
	do
	  echo -n "Shall I delete it (y/n) [y]? "
	  read input
	  if [ $input = "y" ]
	  then
	    wd=1
	    break
	  elif [ $input = "n" ]
	  then
	    wd=0
	    break
	  elif [ ! $input ]
	  then
	    wd=1
	    break
	  else
	    echo "Please answer \`Y' or \`N'."
	  fi 2>/dev/null
	done

	if [ $wd = 1 ]
	then
		/bin/rm -f /etc/lyx/system.lyxrc
		/bin/rmdir /etc/lyx
	fi
fi

#DEBHELPER#

if [ -e $/usr/bin/texconfig ] && fgrep -q TEXMFMAIN /usr/lib/texmf/web2c/texmf.cnf
then
	/usr/bin/texhash
fi

# Automatically added by dh_installmenu
if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
# End automatically added section