File: mk-dirs_h.pl

package info (click to toggle)
aspell 0.60.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 14,988 kB
  • sloc: cpp: 24,346; sh: 12,325; perl: 1,921; ansic: 1,661; makefile: 829; sed: 16
file content (16 lines) | stat: -rw-r--r-- 507 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

foreach (@ARGV) {s|/+|/|g; s|/$||;}

($prefix, $data, $lib, $conf,$debdictdir) = @ARGV;

sub def ( $ ) {
  return qq|"<prefix:$1>"| if $_[0] =~ m|^$prefix/?(.+)$|;
  return qq|"$_[0]"|;
}

printf qq|#define PREFIX "%s"\n|, $prefix;
printf qq|#define DATA_DIR %s\n|, def($data);
print  qq|#define DICT_DIR "<data-dir>"\n| if $lib eq $data;
printf qq|#define DICT_DIR %s\n|, def($lib) if $lib ne $data;
printf qq|#define CONF_DIR %s\n|, def($conf);
printf qq|#define DEBIAN_DICT_DIR %s\n|, def($debdictdir);