#!/usr/bin/env python

work_config = """

[user]
	email = frans.slothouber@intraffic.nl
	name = Frans Slothouber
[push]
	default = simple

"""

home_config = """

[user]
	email = rfsber@xs4all.nl
	name = Frans Slothouber
[push]
	default = simple

"""

import sys
print(sys.argv)
if len(sys.argv) > 1:
    kind = sys.argv[1]
    print(kind)
    with open("/home/frans/.gitconfig", "w") as outf:
        if kind == "work":
            config = work_config
        else:
            config = home_config

        outf.write(config)

        print("Switched to {}".format(kind))


