log: big changes, more to come
This commit is contained in:
parent
990f4cd542
commit
b0d9876558
1 changed files with 10 additions and 1 deletions
|
@ -2,5 +2,14 @@
|
|||
|
||||
# edit the system log located in the docs repo, but also find the docs repo based on what ~/todo points to
|
||||
log() {
|
||||
$EDITOR "$(git -C "$(dirname "$(realpath ~/todo)")" rev-parse --show-toplevel)/system-log"
|
||||
DOCS_REPO="${DOCS_REPO:-$(git -C "$(dirname "$(realpath ~/todo)")" rev-parse --show-toplevel)}"
|
||||
LOG_FILE=system-log
|
||||
LOG_FILE_PATH="$DOCS_REPO/$LOG_FILE"
|
||||
|
||||
if git -C "$DOCS_REPO" pull; then
|
||||
$EDITOR "$LOG_FILE_PATH"
|
||||
git -C "$DOCS_REPO" commit -m "$LOG_FILE" "$LOG_FILE_PATH"
|
||||
else
|
||||
$EDITOR "$LOG_FILE_PATH"
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue