Created
January 21, 2016 15:29
-
-
Save robballou/6a96d1a4c3222ed3acd3 to your computer and use it in GitHub Desktop.
Some functions for shells and drush
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
# drestore() | |
# | |
# Restore a drush database backup: | |
# | |
# drestore [backup] | |
function drestore() { | |
drush sql-drop --yes | |
pv $1 | drush sqlc | |
if [[ -e ./core ]]; then | |
drush cache-rebuild | |
return | |
fi | |
drush registry-rebuild | |
} | |
# dren() | |
# | |
# drush re-enable | |
function dren() { | |
# drupal 8 | |
if [[ -e ./core ]]; then | |
drush pm-uninstall --yes $1 && drush pm-enable --yes $1 | |
return | |
fi | |
drush pm-disable --yes $1 && drush pm-enable --yes $1 | |
} | |
# dun() | |
# | |
# drush uninstall | |
function dun() { | |
# drupal 8 | |
if [[ -e ./core ]]; then | |
drush pm-uninstall --yes | |
return | |
fi | |
drush pm-disable --yes $1 && drush pm-uninstall --yes $1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment