#!/usr/bin/python

import plistlib as plist
import sys
import os

if len(sys.argv) < 4:
	print "Error: at least three arguments needed"
	sys.exit(1)


fileName = sys.argv[1]
newBundleIdentifier = sys.argv[2]


dict = plist.readPlist(fileName)

dict['CFBundleIdentifier'] = newBundleIdentifier

plist.writePlist(dict,fileName)

sys.exit(0)


