Skip to content

Instantly share code, notes, and snippets.

Created August 26, 2011 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/1173333 to your computer and use it in GitHub Desktop.
Save anonymous/1173333 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import glob
if __name__ == '__main__':
with open('register.sh','w') as fd:
fd.write("#!/bin/sh\n")
for conf in glob.glob('/mnt/tmp/haskellplatform-conf/*.conf'):
with open(conf, 'r') as conf_fd:
fd.write("echo '%s'" % conf_fd.read())
fd.write("| '/usr/bin/ghc-pkg' 'update' '-' '--global' '--no-user-package-conf' \"$@\"\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment