~ubuntu-branches/ubuntu/lucid/cmake/lucid

« back to all changes in this revision

Viewing changes to Modules/CPack.RuntimeScript.in

  • Committer: Bazaar Package Importer
  • Author(s): Artur Rona
  • Date: 2009-12-16 11:11:54 UTC
  • mfrom: (3.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091216111154-6accvv6yq86h2hkc
Tags: 2.8.0-5ubuntu1
* Merge from debian testing (LP: #497349). Remaining changes:
  - Keep the Replaces: on cmake-data to cover the Kubuntu version from
    Jaunty in case someone decides to do an (unsupported) Jaunty->Lucid
    upgrade.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# Modified from: Aaron Voisine <aaron@voisine.org>
4
4
 
5
5
CWD="`dirname \"$0\"`"
6
 
TMP=/tmp/$UID/TemporaryItems
7
 
 
8
 
version=`sw_vers -productVersion`
9
 
if [ "$?" == "0" ]; then
10
 
  major=${version%%\.*}
11
 
  rest=${version#*\.}
12
 
  minor=${rest%%\.*}
13
 
  build=${rest#*\.}
14
 
else
15
 
  major=10
16
 
  minor=4
17
 
  build=0
18
 
fi
19
 
 
20
 
echo $version
21
 
echo "Major = $major"
22
 
echo "Minor = $minor"
23
 
echo "Build = $build"
24
 
 
25
 
 
26
 
# if 10.5 or greater, then all the open-x11 stuff need not occur
27
 
if ((( $major < 10 )) || ((( $major == 10)) && (( $minor < 5 )))); then
28
 
version=`sw_vers -productVersion`
29
 
if [ "$?" = "0" ]; then
30
 
  major=${version%%\.*}
31
 
  rest=${version#*\.}
32
 
  minor=${rest%%\.*}
33
 
  build=${rest#*\.}
34
 
else
35
 
  major=10
36
 
  minor=4
37
 
  build=0
38
 
fi
39
 
 
40
 
echo $version
41
 
echo "Major = $major"
42
 
echo "Minor = $minor"
43
 
echo "Build = $build"
44
 
 
45
 
 
46
 
# if 10.5 or greater, then all the open-x11 stuff need not occur
47
 
if ((( $major < 10 )) || ((( $major == 10)) && (( $minor < 5 )))); then
 
6
TMP=/tmp/$(id -ru)/TemporaryItems
 
7
 
 
8
version=`sw_vers -productVersion`
 
9
if [ "$?" = "0" ]; then
 
10
  major=${version%%\.*}
 
11
  rest=${version#*\.}
 
12
  minor=${rest%%\.*}
 
13
  build=${rest#*\.}
 
14
else
 
15
  major=10
 
16
  minor=4
 
17
  build=0
 
18
fi
 
19
 
 
20
echo $version
 
21
echo "Major = $major"
 
22
echo "Minor = $minor"
 
23
echo "Build = $build"
 
24
 
 
25
 
 
26
# if 10.5 or greater, then all the open-x11 stuff need not occur
 
27
if [ "$major" -lt 10 ] || ([ "$major" -eq 10 ] && [ "$minor" -lt 5 ]); then
 
28
version=`sw_vers -productVersion`
 
29
if [ "$?" = "0" ]; then
 
30
  major=${version%%\.*}
 
31
  rest=${version#*\.}
 
32
  minor=${rest%%\.*}
 
33
  build=${rest#*\.}
 
34
else
 
35
  major=10
 
36
  minor=4
 
37
  build=0
 
38
fi
 
39
 
 
40
echo $version
 
41
echo "Major = $major"
 
42
echo "Minor = $minor"
 
43
echo "Build = $build"
 
44
 
 
45
 
 
46
# if 10.5 or greater, then all the open-x11 stuff need not occur
 
47
if [ "$major" -lt 10 ] || ([ "$major" -eq 10 ] && [ "$minor" -lt 5 ]); then
48
48
ps -wx -ocommand | grep -e '[X]11.app' > /dev/null
49
49
if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
50
50
    echo "rm -f ~/.xinitrc" > ~/.xinitrc