File: postinst

package info (click to toggle)
asterisk-prompt-fr-proformatique 20070706-1.4-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 15,012 kB
  • sloc: sh: 65; makefile: 44
file content (26 lines) | stat: -rw-r--r-- 578 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

set -e

case "$1" in
    configure)
	if dpkg --compare-versions "$2" lt 20070706-1.4-2; then
	    for d in dictate digits letters phonetic; do
		for e in "/usr/share/asterisk/sounds/${d}/fr" "/usr/share/asterisk/sounds/fr/${d}"; do
		    if ! [ -L "${e}" ] && [ -d "${e}" ]; then
			rmdir --ignore-fail-on-non-empty "${e}"
		    fi
		done
	    done
	    for d in dictate digits letters phonetic; do
		if ! [ -e "/usr/share/asterisk/sounds/fr/${d}" ]; then
		    ln -s "../${d}/fr" "/usr/share/asterisk/sounds/fr/${d}"
		fi
	    done
	fi
	;;
esac

#DEBHELPER#

exit 0