git - Passing a string to a bash script via an argument -
i'm writing bash script that, amongst other things, triggers git commit on codebase specified drupal 6 site. script accepts 2 arguments, second of commit message git commit.
#!/bin/sh directoryname=${1} commitmsg=${2} echo $directoryname echo $commitmsg git add . git commit -vam "the commit message"
the script called this:
sh git-bash-test.sh name_of_directory "custom commit message"
how can change out "the commit message" value stored in $commitmsg?
simply replace "$commitmsg":
git commit -vam "$commitmsg"
Comments
Post a Comment