Created
February 22, 2017 11:10
-
-
Save esolitos/6196ffb7547af39c306035c0bdab833b to your computer and use it in GitHub Desktop.
Useful bash alias/function to update Drupal modules on Composer-Based Drupal 8 installations
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
# Update Drupal modules on composer-based setups | |
comp-drup() { | |
if [ -z "$1" ]; then echo -e "\e[31m[ERR] You MUST specify a module name\e[0m" 1>&2; return -1; fi; | |
if [ ! -f ./composer.json ]; then echo -e "\e[31m[ERR] Missing composer.json file. Are you sure you're in the correct directory? \e[0m" 1>&2; return -2; fi; | |
composer update "drupal/$1" --with-dependencies | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment