Last active
December 15, 2015 06:19
-
-
Save sagotsky/5215830 to your computer and use it in GitHub Desktop.
Compares the product of our make file with what's currently checked in to git's SCHOLAR-3.4 branch. Only checks contrib modules.
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
PATCHES.txt | |
*.info |
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
#!/bin/sh | |
# Download OpenScholar. Run its make file. Compare its contrib/ modules against what's in our repo. | |
BIN=$(which $0) | |
while [ -L "$BIN" ] ; do | |
BIN=$(readlink $BIN) | |
done | |
REPO='https://github.com/openscholar/openscholar.git' | |
CHECK_BRANCH='SCHOLAR-3.x' | |
CHECK_CONTRIB='modules/contrib/' | |
MAKE_BRANCH='2100-drushmake' | |
MAKE_CONTRIB='openscholar/modules/contrib/' | |
DIFF_OPTS=" --exclude-from=${BIN%/*}/diff_exclude " | |
rm -rf /tmp/{$CHECK_BRANCH,$MAKE_BRANCH} | |
git clone -b $CHECK_BRANCH $REPO /tmp/$CHECK_BRANCH | |
cp -R /tmp/$CHECK_BRANCH /tmp/$MAKE_BRANCH | |
git --work-tree="/tmp/$MAKE_BRANCH" --git-dir="/tmp/$MAKE_BRANCH/.git" checkout $MAKE_BRANCH | |
cd /tmp/$MAKE_BRANCH | |
bash scripts/build -y | |
TMP='/tmp/os_check_make-file_list.diff' | |
diff "/tmp/$CHECK_BRANCH/$CHECK_CONTRIB" "/tmp/$MAKE_BRANCH/$MAKE_CONTRIB" -r -w -q $DIFF_OPTS &> $TMP | |
echo $(grep -c 'Only' $TMP) files with no counterpart. | |
echo $(grep -c 'differ' $TMP) files that differ. | |
echo See $TMP for file list diff. | |
TMP_FULL='/tmp/os_check_make-full_list.diff' | |
diff $DIFF_OPTS "/tmp/$CHECK_BRANCH/$CHECK_CONTRIB" "/tmp/$MAKE_BRANCH/$MAKE_CONTRIB" -r -w $DIFF_OPTS &> $TMP_FULL | |
echo See $TMP_FULL for full text diff. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment