Created
October 27, 2012 05:15
-
-
Save dkl4/3963035 to your computer and use it in GitHub Desktop.
Create subdirs and initiate Git repos - Drupal examples
This file contains hidden or 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
| #!/bin/bash | |
| # 2012-10-26 | |
| # This needs to be run from sites/all/examples with LICENSE.TXT in that directory | |
| examples="action ajax batch block cache cron email field field_permission js node_access nodeapi pager queue simpletest tabledrag token trigger" | |
| #examples="action ajax" | |
| i=0 | |
| for example in $examples | |
| do | |
| let i++ | |
| mkdir $example | |
| cp LICENSE.txt $example | |
| cd $example | |
| cat > README.txt <<EOM | |
| 2012-11-${i} | |
| From Drupal 7 examples at http://drupal.org/project/examples | |
| This is the ${example}_example. | |
| This offers two potential improvements : | |
| 1) Step-by-step Git commits so you can progress in bite-size increments. | |
| 2) Additional comments on how the examples work. | |
| EOM | |
| git init | |
| git add . | |
| git commit -m "Initial commit of README.txt and LICENSE.txt" | |
| touch ${example}_example.info | |
| touch ${example}_example.module | |
| touch ${example}_example.test | |
| cd .. | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment