File: postinstall.pl

package info (click to toggle)
psh 1.8-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 812 kB
  • ctags: 520
  • sloc: perl: 7,327; makefile: 41; sh: 12
file content (20 lines) | stat: -rw-r--r-- 462 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

if ($^O eq 'MSWin32') {
	mkdir("/psh");
	system("xcopy share\\themes \\psh /Y");
	system("xcopy share\\complete \\psh /Y");
} else {
	my $where;

	if( -w '/') {
		$where = $ARGV[2] || "";
		$where .= $ARGV[0]||$ARGV[1]||'/usr/local';
	} else {
		$where ='~/.psh';
	}
	print "Installing share files to $where/share/psh\n";
	system("mkdir -p $where/share/psh");
	system("cp -r share/themes $where/share/psh");
	system("cp -r share/complete $where/share/psh");
}