Created
January 16, 2013 10:52
-
-
Save peterjaap/4546320 to your computer and use it in GitHub Desktop.
Quickly generate modman file for Magento extensions
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
for i in `find . -type f | grep -v \.git | grep -v "^.$" | grep -v "modman" | sed 's/\.\///'`; do echo ${i} ${i}; done > modman |
This should more or less give you what you want. It's a fairly consistent pattern of about 2 levels predictable format which can be dropped (since you know them to be there anyway) and take the next levels up to 3 levels max. You'll need tree
for this one though and it took me about 2 mins to write up so .. not too sophisticated. Add paths to the array, change the level, inner loop stuff etc as you please
(declare -a tt && tt=( app/design app/code app/etc skin/frontend ) &&\
for t in "${tt[@]}"; do tree -fi -L 3 --noreport $t | awk 'NR > 2 { print $0 " " $0 }'; done)\
> modman
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hm - some heuristics to link full folders like app/code/local/Foo/Bar or template subfolders would be great