Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions git-clone-related
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ if [ "$1" = "--upstream-branch" ]; then
shift
fi

SCRIPT_NAME=$(basename -- "$0")

if [ "$#" -lt 2 ]; then
echo "Usage: $0 UPSTREAM_ORG REPO_NAME [DESTINATION] [GIT_CLONE_ARGS...]" >&2
echo "Usage: ${SCRIPT_NAME} UPSTREAM_ORG REPO_NAME [DESTINATION] [GIT_CLONE_ARGS...]" >&2
exit 1
fi

Expand Down Expand Up @@ -167,4 +169,4 @@ else
}; }; }
fi

echo "$0: ${DESTINATION} is at $(cd "${DESTINATION}" && git rev-parse HEAD)"
echo "${SCRIPT_NAME}: ${DESTINATION} is at $(cd "${DESTINATION}" && git rev-parse HEAD)"
6 changes: 3 additions & 3 deletions git-find-fork
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
# Often, you can use the `git-clone-related` script instead of this one.

if [ "$#" -ne 3 ]; then
script=$(basename -- "$0")
>&2 echo "Error: $script requires 3 arguments, got $#"
>&2 echo "Usage: $script ORG UPSTREAM_ORG REPONAME"
SCRIPT_NAME=$(basename -- "$0")
>&2 echo "Error: ${SCRIPT_NAME} requires 3 arguments, got $#"
>&2 echo "Usage: ${SCRIPT_NAME} ORG UPSTREAM_ORG REPONAME"
exit 1
Comment thread
mernst marked this conversation as resolved.
fi

Expand Down