File: fix-debian-scripts

package info (click to toggle)
emacs21 21.2-1woody3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 87,780 kB
  • ctags: 58,919
  • sloc: lisp: 491,843; ansic: 236,968; xml: 4,262; sh: 3,919; makefile: 2,180; perl: 1,085; cs: 775; asm: 254; csh: 9; sed: 4
file content (20 lines) | stat: -rw-r--r-- 770 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl -w

my $major_rev = $ARGV[0];
my $minor_rev = $ARGV[1];
my $upstream = $ARGV[2];
my $target_sys = $ARGV[3];
my $alternatives = $ARGV[4];
my $info_files_str = $ARGV[5];
my @replacefiles = @ARGV[6 .. $#ARGV];

my $result = system("perl -pi" .
                    " -e \"s/\\\@MAJOR_VERSION\\\@/${major_rev}/go;\"" .
                    " -e \"s/\\\@MINOR_VERSION\\\@/${minor_rev}/go;\"" .
                    " -e \"s/\\\@FULL_VERSION\\\@/${upstream}/go;\"" .
                    " -e \"s/\\\@INFOFILES\\\@/${info_files_str}/go;\"" .
                    " -e \"s/\\\@TARGET_SYS\\\@/${target_sys}/go;\"" .
                    " -e \"s/\\\@ALTERNATIVES\\\@/${alternatives}/go;\"" .
                    " " . join(' ', @replacefiles));

exit ($result / 256);