Created
October 13, 2011 16:53
-
-
Save ercanozkaya/1284778 to your computer and use it in GitHub Desktop.
A script to symlink various repositories into one installation at once
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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