[SM-Commit] GIT changes to test cauldron by Justin Boffemmyer (80d8551b5311d3f2701df6467afb2c447ba04a9a)
Justin Boffemmyer
scm at sourcemage.org
Sat Dec 27 17:38:37 EST 2008
GIT changes to test cauldron by Justin Boffemmyer <flux at sourcemage.org>:
scripts/spellcaster.sh | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 80d8551b5311d3f2701df6467afb2c447ba04a9a
Author: Justin Boffemmyer <flux at sourcemage.org>
Commit: Justin Boffemmyer <flux at sourcemage.org>
scripts/spellcaster.sh: shift by OPTIND
The argument shifting was previously happening internal to the
parse_options function, so it wasn't getting passed back up to the
caller. This corrects this by returning the number of arguments to shift
by and letting the caller do the shifting.
diff --git a/scripts/spellcaster.sh b/scripts/spellcaster.sh
index ac499f8..01ffc6f 100755
--- a/scripts/spellcaster.sh
+++ b/scripts/spellcaster.sh
@@ -46,7 +46,7 @@ function parse_options() {
* ) echo "Unrecognized option." >&2 && usage ;;
esac
done
- shift $(($OPTIND - 1))
+ return $(($OPTIND - 1))
}
function priv_check() {
@@ -231,6 +231,7 @@ function clean_target() {
# main()
parse_options $*
+shift $?
priv_check
More information about the SM-Commit
mailing list