Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 27 lines (22 sloc) 412 Bytes
#!/bin/bash
# handy wrapper for 'git commit', prepending package name
args=()
msg=
# check for -m ...
while [[ ${#} -gt 0 ]]; do
if [[ ${1} == -m ]]; then
msg=${2}
shift 2
continue
fi
args+=( "${1}" )
shift
done
set -e -x
tmpf=$(mktemp)
echo "$(pkg): ${msg}" > "${tmpf}"
[[ ${msg} ]] || "${EDITOR:-vim}" "${tmpf}"
if [[ -s ${tmpf} ]]; then
git commit -F "${tmpf}" "${args[@]}"
fi
rm -f "${tmpf}"
You can’t perform that action at this time.