Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print usage message from 'compare' #727

Merged
merged 2 commits into from
Sep 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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