Created
June 5, 2017 15:38
-
-
Save dasginganinja/ee28558be625241025e65c9da83d0f6b to your computer and use it in GitHub Desktop.
Bash Script for easily seeing differences between module versions
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
#!/bin/bash | |
MODULE=$1 | |
VERFROM=$2 | |
VERTO=$3 | |
shift | |
shift | |
shift | |
if [ "$MODULE" == "" ] || [ "$VERFROM" == "" ] || [ "$VERTO" == "" ] | |
then | |
echo "Usage: $0 module version-from version-to" | |
printf "\tExample: $0 ldap 7.x-2.1 7.x-2.2\n" | |
exit 1 | |
fi | |
NOW=$(date +"%Y%m%dT%H%M%S") | |
DIFFOLDER="/tmp/${MODULE}_${VERFROM}_${VERTO}_${NOW}" | |
MODFROM="$MODULE-$VERFROM" | |
MODTO="$MODULE-$VERTO" | |
echo "Creating $DIFFOLDER" | |
mkdir $DIFFOLDER | |
cd $DIFFOLDER | |
drush @none dl $MODFROM | |
mv $MODULE $MODFROM | |
drush @none dl $MODTO | |
mv $MODULE $MODTO | |
diff -qr "$MODFROM" "$MODTO" | |
diff -x '*.info' -r "$MODFROM" "$MODTO" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment