Skip to content

Instantly share code, notes, and snippets.

@ercanozkaya
Created October 13, 2011 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ercanozkaya/1284778 to your computer and use it in GitHub Desktop.
Save ercanozkaya/1284778 to your computer and use it in GitHub Desktop.
A script to symlink various repositories into one installation at once
#!/usr/bin/env python
import sys, os
help = """
Usage: ./batch_symlinker destination projects [..]
Example: ./batch_symlinker joomla17 nooku-framework nooku-components fileman
"""
projects_dir = '/Users/ercan/Projects'
sites_dir = '/Users/ercan/www'
try:
destination = os.path.join(sites_dir, sys.argv[1])
projects = sys.argv[2:]
except IndexError:
print 'Missing argument'
exit(help)
for project in projects:
source = os.path.join(projects_dir, project)
if os.path.exists(os.path.join(source, 'code')):
source = os.path.join(source, 'code')
os.system('symlinker %s %s' % (source, destination))
print 'Next steps:'
print '1- Add a DB entry for koowa plugin'
print '2- Enable Mootools plugin if you are on a 1.5 site'
print '3- Run install files of your components'
print '\nMay the code be with you\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment