Last active
September 7, 2017 15:14
-
-
Save aycabta/24a122ba798337cc3b9a7bfb32fc28f4 to your computer and use it in GitHub Desktop.
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 | |
if [ $# -ne 1 ]; then | |
echo 'Usage: ./doctest.sh username/repository' | |
exit -1 | |
fi | |
GITHUB_REPOSITORY_PATH=$1 | |
GITHUB_USERNAME=`echo $GITHUB_REPOSITORY_PATH | sed -e 's/\/.\+$//'` | |
if [ ! -d original-rdoc ]; then | |
git clone -b master --single-branch git@github.com:ruby/rdoc.git original-rdoc | |
cd original-rdoc | |
git checkout -q 0c5eb20 # This is HEAD of master as of now | |
bundle --quiet | |
cd .. | |
fi | |
if [ ! -d ripper-rdoc ]; then | |
git clone -b use-ripper --single-branch git@github.com:aycabta/rdoc.git ripper-rdoc | |
cd ripper-rdoc | |
git checkout -q 23f12c1 # This is HEAD of use-ripper branch as of now | |
bundle --quiet | |
cd .. | |
fi | |
if [ ! -d $GITHUB_USERNAME ]; then | |
mkdir $GITHUB_USERNAME | |
fi | |
if [ ! -d $GITHUB_REPOSITORY_PATH ]; then | |
git clone --depth 1 git@github.com:$GITHUB_REPOSITORY_PATH.git $GITHUB_REPOSITORY_PATH | |
fi | |
RUBYOPT=-Ioriginal-rdoc/lib ruby original-rdoc/exe/rdoc -o $GITHUB_REPOSITORY_PATH/doc-original $GITHUB_REPOSITORY_PATH | |
RUBYOPT=-Iripper-rdoc/lib ruby ripper-rdoc/exe/rdoc -o $GITHUB_REPOSITORY_PATH/doc-ripper $GITHUB_REPOSITORY_PATH | |
diff -ru --exclude=*.js --exclude=*.gz --exclude=*.css --exclude=*.png --exclude=*.gif --exclude=*.ttf --exclude=created.rid $GITHUB_REPOSITORY_PATH/doc-original $GITHUB_REPOSITORY_PATH/doc-ripper | less |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment