diff --git a/lib/sde-commit.in b/bin/sde-commit old mode 100644 new mode 100755 similarity index 90% rename from lib/sde-commit.in rename to bin/sde-commit index 58dc450..e9e6751 --- a/lib/sde-commit.in +++ b/bin/sde-commit @@ -1,3 +1,4 @@ +#!/bin/sh # --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # @@ -16,13 +17,12 @@ #Description: Commits into svn the changes on the given locations #Alias: ci -commit_usage() { - cat <] [ [...]] (Alias: ci) +set -e - Note: location can be a package name or an explicit file/directory -EOT -} +[ -n "$SDEROOT" ] || + export SDEROOT=$( cd "${0%/*}/.."; pwd -P ) + +. $SDEROOT/lib/libsde.in # svn or svk ? # @@ -32,12 +32,9 @@ else SVN=svk fi -# commit_main -# -commit_main() { -local locations= x= y= -local logfile= -local tmpfile=$SDEROOT/tmp/$$ +locations= x= y= +logfile= +tmpfile=$SDEROOT/tmp/$$ mkdir -p "$SDEROOT/tmp" @@ -152,13 +149,3 @@ fi rm -f $tmpfile.status $tmpfile.diff [ "$logfile" != "$tmpfile.log" ] || rm -f "$logfile" -} - -if [ "$module" == "commit" ]; then - if [ $# -gt 0 ]; then - commit_main "$@" - else - commit_usage - exit 1 - fi -fi diff --git a/lib/sde-commit.hlp b/lib/sde-commit.hlp new file mode 100644 index 0000000..6f97132 --- /dev/null +++ b/lib/sde-commit.hlp @@ -0,0 +1,3 @@ +Usage: sde commit [--file ] [ [...]] (Alias: ci) + + Note: location can be a package name or an explicit file/directory