I need to pass argument for commit function. When I do the commit through
./test.sh commit -m "first"
its not really committing it. believe somehow I am not passing right argument parameter either in case or function.
Here is the script
#!/usr/bin/env bash
clone () {
git clone $1
}
commit () {
git commit $*
}
case $1
in
clone) clone $2 ;;
commit) commit $2 ;;
*) echo "Invalid Argument passed" ;;
esac