File: ipolish.config.in

package info (click to toggle)
ipolish 20060618-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,196 kB
  • ctags: 20
  • sloc: perl: 261; makefile: 112; awk: 43; sh: 25
file content (31 lines) | stat: -rw-r--r-- 634 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
27
28
29
30
31
#!/usr/bin/perl

# create /var/lib/ispell/polish.hash
my $dir='/var/lib/ispell';
if (! -e "$dir/polish.hash") {
	mkdir_p("$dir");
	open (F, ">>$dir/polish.hash") && close(F);
}

#DEBHELPER#

# Now the package local stuff

# Telling how to update the polish dictionary

input ("medium","ipolish/info_update_polish_hash");
go();

## Local functions
# Same as `mkdir -p'
sub mkdir_p
{
        my $dir = shift;
        return if (-d $dir);
        my $p = "";
        foreach $f (split "/", $dir)
        {
                $p .=  $f . "/";
                (-d $p) or (mkdir $p, 0755) or die "Can't create directory $p: $!\n";
        }
}