Skip to content
Browse files

Added --help flags to update and update_sub

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...
1 parent 4e8959c commit f907d7b41070eaf622cf6e684639b9367b950b98 alex choi committed with Parker, Matt
Showing with 19 additions and 1 deletion.
  1. +11 −1 update
  2. +8 −0 update_sub
View
12 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
View
8 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

0 comments on commit f907d7b

Please sign in to comment.
Something went wrong with that request. Please try again.