Skip to content

Commit

Permalink
Add usage guidance to 'compare' script
Browse files Browse the repository at this point in the history
I was attempting to run it and failed to remember how it worked and that
it needed arguments. I thought it might have automatically diffed the
current branch with master.

We could add something to use current if the second arg isn't included.
  • Loading branch information
michaeljones committed Sep 1, 2021
1 parent 3591eb7 commit 4d643f6
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions documentation/compare
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/bin/sh
#!/bin/sh -e

first=$1
second=$2

if [ -z "$second" ]; then
echo "Usage: compare <branch name A> <branch name B>"
exit 1
fi

firstdir=comparison/first
seconddir=comparison/second

Expand All @@ -19,8 +24,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 +41,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 4d643f6

Please sign in to comment.