mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-15 06:32:40 +00:00
Updated hcpn script to commit the created note.
This commit is contained in:
@@ -4,7 +4,15 @@
|
|||||||
|
|
||||||
dirname="$(isosec)"
|
dirname="$(isosec)"
|
||||||
mkdir "${HCP_NOTES}/${dirname}"
|
mkdir "${HCP_NOTES}/${dirname}"
|
||||||
readme="${HCP_NOTES}/${dirname}/README.md"
|
dir="$HCP_NOTES/$dirname"
|
||||||
|
readme="$dir/README.md"
|
||||||
title="$*"
|
title="$*"
|
||||||
printf "# %s\n\n" "${title}" > "${readme}"
|
printf "# %s\n\n" "${title}" > "${readme}"
|
||||||
|
message="${title:-"Autocommit message"}"
|
||||||
|
cd "$dir"
|
||||||
|
git pull -q
|
||||||
|
git add -A "$dir"
|
||||||
|
git commit -m "$message"
|
||||||
|
git push
|
||||||
|
cd -
|
||||||
vi "${readme}"
|
vi "${readme}"
|
||||||
|
|||||||
Reference in New Issue
Block a user