#!/bin/sh # note message string must come after options cmd='git' while getopts clLsS f; do case $f in c|l|L|s|S) cmd="cfg -$f";; \?) exit 1;; esac done shift $((OPTIND-1)) mes="${1:-refactor}" $cmd add -u $cmd commit -m "$mes" $cmd push