Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
Added --help flags to update and update_sub
Browse files Browse the repository at this point in the history
So that developers will know what these commands do and how to use them.

Signed-off-by: Parker, Matt <mparker@pivotallabs.com>
  • Loading branch information
alex choi authored and Parker, Matt committed Dec 6, 2013
1 parent 4e8959c commit f907d7b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
12 changes: 11 additions & 1 deletion update
@@ -1,4 +1,14 @@
#!/bin/bash -x
#!/bin/bash

if [ "$1" == "--help" ]; then
echo "USAGE: $0"
echo " This command takes no arguments."
echo ""
echo "This script does a git submodule update on all submodules"
exit 0
fi

set -x

if [[ "$(git --version | grep 'version 1.7')x" != "x" ]]; then
git pull && git submodule foreach --recursive git submodule sync && git submodule update --init --recursive
Expand Down
8 changes: 8 additions & 0 deletions update_sub
@@ -1,5 +1,13 @@
#!/bin/sh

if [ "$1" == "--help" ]; then
echo "Usage: $0 REPO_NAME"
echo ""
echo "This script updates the requested submodule to the latest commit on origin."
echo "It will then prepare a commit message for you containing all of the commit messages between the previous submodule sha and the new submodule sha."
exit 0
fi

if [ "$#" -ne 1 ]; then
echo "Usage: $0 REPO_NAME"
exit 1
Expand Down

0 comments on commit f907d7b

Please sign in to comment.