Skip to content

Commit

Permalink
Merge pull request #727 from michaeljones/compare-usage
Browse files Browse the repository at this point in the history
Print usage message from 'compare'
  • Loading branch information
michaeljones authored Sep 1, 2021
2 parents 3591eb7 + 7d18d81 commit e073688
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions documentation/compare
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
#!/bin/sh
#!/bin/sh -e

first=$1
second=$2

firstdir=comparison/first
seconddir=comparison/second
if [ -z "$first" ]; then
echo "Usage: compare <branch name A> [<branch name B>]"
echo ""
echo "The second argument defaults to the current branch if not specified"
exit 1
fi

# Remember the branch we're on
currentbranch=`git symbolic-ref --short HEAD`

if [ -z "$second" ]; then
second=$currentbranch
fi

firstdir=comparison/first
seconddir=comparison/second

# Make sure the output directory exists
mkdir -p comparison

Expand All @@ -19,8 +30,8 @@ rm -fr $seconddir
export BREATHE_COMPARE=True

# Checkout the first target
echo git checkout $1
git checkout $1
echo git checkout $first
git checkout $first
# Run doxygen for this state
(cd ../examples/specific; make)
(cd ../examples/tinyxml; make)
Expand All @@ -36,8 +47,8 @@ git checkout Makefile


# Checkout the second target and repeat
echo git checkout $2
git checkout $2
echo git checkout $second
git checkout $second
(cd ../examples/specific; make)
(cd ../examples/tinyxml; make)
(cd ../examples/doxygen; make)
Expand Down

0 comments on commit e073688

Please sign in to comment.