Simplifying submodule update script
#!/bin/bash
set -e
-submodule_warning='Uncommitted submodules changes will be clobbered'
-unversioned_change_warning='Unversioned changes will be clobbered'
-
function has_upstream() {
git rev-parse @{u} > /dev/null 2>&1
}
-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"
- echo ""
- echo "NOTE: $submodule_warning"
- exit 0
-fi
-
echo ""
-echo "===> $submodule_warning <==="
+echo "===> Uncommitted submodules changes will be clobbered <==="
echo ""
echo ""
-echo "===> $unversioned_change_warning <==="
+echo "===> Unversioned changes will be clobbered <==="
echo ""
set -x # show the commands we are running
