Automating Drupal Module Deployment with Bash

Part of the process of migrating new customers to Acquia Hosting involves adding (or verifying the presence of) three Drupal modules: Acquia Network Connector: get status and recommendations from Acquia Insight Fast 404: reduce the cost of 404s Memcache API and Integration: improve performance by moving cache data into memory Manual?! Awe shucks… Verifying, adding, and committing these modules manually generally takes about five to ten minutes and can be error-prone....

2014-04-26 · 4 min · 697 words · Nathaniel Hoag

More Fun with 'git filter-branch'

Previously, I covered the use of the git filter-branch for removing large media assets from a repository’s history. Recently I had a new opportunity to perform this task on whole directories. Here is the command sequence I used to clean up the repo history and to shrink the pack file: # Remove a directory from history in all branches and tags $ git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch path/to/dir' --tag-name-filter cat -- --all # Shrink the local pack $ rm -Rf ....

2014-04-01 · 1 min · 188 words · Nathaniel Hoag

Snapshot: My Git Usage

Following are the Git commands and Git family of tools that I use in my day-to-day. Before writing this post, I generated a report of my most-used git sub-commands with the following: history | awk '$2 == "git" {print $3}' | sort | uniq -c | sort -nr | head -n 20 Most of my Git usage is bread-and-butter Git commands, but I’ll highlight some of my favorite Git features below....

2014-03-15 · 4 min · 681 words · Nathaniel Hoag

Another Hodgepodge Update

Recently, a bash script that I’ve used many times on lots of different types of servers was giving very strange results. Typically the script is called as ./script.sh info.cfg and proceeds to run through several processes. On this occasion, I was left with : command not found. When I hit the script with bash -x I could see that both the script and the config file were giving strange results and choking on line-breaks and curly braces....

2013-12-29 · 2 min · 425 words · Nathaniel Hoag