cat << EOF > ~/bin/hugo_publish
#! /bin/sh
if [ $# = 0 ]; then
echo "args error"
else
pushd ${HOME}/blog && git add . && git commit -m "${1}" && git push origin master && popd
fi
EOF
Usage
hugo_publish "this is comment."
cat << EOF > ~/bin/hugo_publish
#! /bin/sh
if [ $# = 0 ]; then
echo "args error"
else
pushd ${HOME}/blog && git add . && git commit -m "${1}" && git push origin master && popd
fi
EOF
hugo_publish "this is comment."