Makefile: Add 'tags' to .PHONY
[git-cola.git] / darwin / name-tarball.py
blob9d33b04d491238cab2138fb76b4806ebc4f44096
1 #!/usr/bin/env python
2 # This is used by the Makefile to name the final app.tar.bz2 file
4 import os
5 import sys
6 import platform
8 sys.path.insert(0, os.getcwd())
10 if not hasattr(platform, 'mac_ver'):
11 print 'This only runs on os x'
12 sys.exit(1)
14 # get the platform
15 macstuff = platform.mac_ver()
16 cpu = platform.processor()
17 proc = {'i386': 'intel'}.get(cpu, cpu)
18 name = 'unknown'
19 version = macstuff[0]
21 if version[:4] == '10.6':
22 name = 'snow_leopard'
23 elif version[:4] == '10.5':
24 name = 'leopard'
25 elif version[:4] == '10.4':
26 name = 'tiger'
27 elif version[:4] == '10.3':
28 name = 'panther'
29 else:
30 name = 'unknown'
32 # git-cola-intel-leopard.app.tar.bz2
33 print('git-cola-%s-%s.app.tar.bz2' % (proc, name))