File: postflight

package info (click to toggle)
camelbones 0.2.3.cvs20040220-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,308 kB
  • ctags: 1,331
  • sloc: sh: 7,585; ansic: 4,413; asm: 2,021; perl: 1,540; objc: 1,463; makefile: 119
file content (30 lines) | stat: -rw-r--r-- 721 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
#!/usr/bin/perl

use strict;
use warnings;

# Post-flight script to be run after the basic CB Runtime install.

# Get the output of the sw_vers command, if there is one.
my $sw_vers = '';
if (-f '/usr/bin/sw_vers') {
	open(SW_VERS, '/usr/bin/sw_vers |');
	while (<SW_VERS>) {
		next unless (/ProductVersion:\s*(.*)/);
		$sw_vers = $1;
		last;
	}
}

# Determine the correct target for the symbolic link in /Library/Frameworks
my $target = '';
if ($sw_vers =~ /10.3.\d+/) {
	# Panther
	$target = '/Library/Frameworks/CamelBones-Panther.framework';
} else {
	# Jaguar or older
	$target = '/Library/Frameworks/CamelBones-Jaguar.framework';
}

# Create the symlink
symlink($target, '/Library/Frameworks/CamelBones.framework');