File: fixpaths.pl

package info (click to toggle)
mgetty 1.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,872 kB
  • sloc: ansic: 42,728; sh: 6,487; perl: 6,262; makefile: 1,457; tcl: 756; lisp: 283
file content (35 lines) | stat: -rwxr-xr-x 1,572 bytes parent folder | download | duplicates (11)
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
#! /usr/bin/perl -w

# fix path/programmname for the list of files
# /usr/local/bin/perl -> perl
# /usr/lib/sendmail -> /usr/sbin/sendmail
# /bin/ksh -> /bin/bash
# /usr/local/bin/vm -> /usr/bin/vm

@fix=(
'debian/mgetty-docs/usr/share/doc/mgetty/contrib/faxmail-smail',
'debian/mgetty-docs/usr/share/doc/mgetty/frontends/faxmail/faxmail',
'debian/mgetty-docs/usr/share/doc/mgetty/contrib/watchit.pl',
'debian/mgetty-docs/usr/share/doc/mgetty/frontends/mail2fax/mail2fax.rc',
'debian/mgetty-docs/usr/share/doc/mgetty/frontends/mmdf-mail2fax/faxgate.pl',
'debian/mgetty-docs/usr/share/doc/mgetty/examples/fax',
'debian/mgetty-docs/usr/share/doc/mgetty/examples/new_fax.hpa',
'debian/mgetty-docs/usr/share/doc/mgetty/examples/new_fax.mime1',
'debian/mgetty-docs/usr/share/doc/mgetty/voice/examples/scripts/button.sh',
'debian/mgetty-docs/usr/share/doc/mgetty/voice/examples/scripts/demo.pl',
'debian/mgetty-docs/usr/share/doc/mgetty/voice/examples/scripts/demo.sh',
'debian/mgetty-docs/usr/share/doc/mgetty/voice/examples/scripts/dtmf.sh',
'debian/mgetty-docs/usr/share/doc/mgetty/voice/examples/scripts/events.sh',
'debian/mgetty-docs/usr/share/doc/mgetty/voice/examples/scripts/message.sh',
'debian/mgetty-docs/usr/share/doc/mgetty/voice/examples/scripts/vmtest.sh' );

foreach $i (@fix) {
	print `sed ' \
		s|/usr/local/bin/perl5|/usr/bin/perl|; \
		s|/usr/local/bin/perl|/usr/bin/perl|; \
		s|/usr/lib/sendmail|/usr/sbin/sendmail|; \
		s|/bin/ksh|/bin/bash|; \
		s|/usr/local/bin/vm|/usr/bin/vm|; \
	' < $i > $i.fixed && mv $i.fixed $i`;
	exit ($? >> 8) if ($? >> 8);
}