User login

Git the Agaric Way: using shell scripts to add and update projects

Update: Forget it. Complication outweighs benefits.

Note: Before you start doing any of this, you would need to copy Agaric's git directory structure-- note that this is not a single git repository, but many git repositories. More on that elsewhere, this is about using the system properly set up.

What finally works:

Navigate to the pseudo-repository's sites directory:

cd /RCS/git/agaric-sites/
Ebony-II:agaric-sites ben$ git-new-site.sh 5 test

Initialized empty Git repository in /RCS/git/agaric-sites/test/.git/Copy of Drupal 5 complete. Use 'cd test' to get in there!
To use git-drupal-5-module.sh to add a module, run it from the modules directory in the sites directory to which you want to add the module. For example, 'cd test/sites/all/modules'

If you want any modules, go get them:
Ebony-II:agaric-sites ben$ cd test/sites/all/modules/

Ebony-II:modules ben$ git-drupal-5-module.sh coder

Initialized empty Git repository in /RCS/git/agaric-sites/test/sites/all/modules/coder/.git/
Created commit d1bae26: coder module installed as submodule
2 files changed, 4 insertions(+), 0 deletions(-)
create mode 100644 .gitmodules
create mode 160000 sites/all/modules/coder

Clone it to the server / directory for the test site:

cd /Applications/MAMP/htdocs
Ebony-II:htdocs ben$ git clone /RCS/git/agaric-sites/test

Initialized empty Git repository in /Applications/MAMP/htdocs/test/.git/

Ebony-II:htdocs ben$ cd test/
Ebony-II:test ben$ git submodule init

Submodule 'sites/all/modules/coder' (/RCS/git/agaric-modules/coder/.git) registered for path 'sites/all/modules/coder'

Ebony-II:test ben$ git submodule update

Initialized empty Git repository in /Applications/MAMP/htdocs/test/sites/all/modules/coder/.git/
Submodule path 'sites/all/modules/coder': checked out 'd1ba7d60a069f65edc8a9287dc17f4b0395dd42b'

Adding a module that does not exist on Drupal.org to the repository

If that module is for instance related_content, in development but not committed to Drupal.org:

Put the module in /RCS/git/agaric-modules, and then:

cd /RCS/git/agaric-modules/related_content
git init
git add .
git commit -a -m "Related content development version import"

Tagging it is optional.

You can then proceed to add the module to a site the same as ever (from the directory you would like to import into in the agaric-sites site, usually sites/all/modules, with git-drupal-5-module.sh related_content.

Note that copies (clones) of all Drupal.org downloaded modules are also stored in agaric-modules, where we can make local modifications to them.

Resolution

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.