From dfe69c29a913816d926f6622272571d67229c248 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Thu, 27 Oct 2022 01:00:00 +0900 Subject: [PATCH] add logseq-sync task --- mod.bash | 5 +++++ termux/install | 3 ++- termux/tasks/logseq-sync | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 termux/tasks/logseq-sync diff --git a/mod.bash b/mod.bash index 44c17cc..86fbbd8 100644 --- a/mod.bash +++ b/mod.bash @@ -64,3 +64,8 @@ function install_pkg_packages() { pkg upgrade -y pkg install -y "${packages[@]}" } + +function install_termux_task() { + mkdir -p ~/.shortcuts/tasks + install -v "$1" ~/.shortcuts/tasks/ +} diff --git a/termux/install b/termux/install index 8176a1c..15917e8 100755 --- a/termux/install +++ b/termux/install @@ -3,4 +3,5 @@ set -euo pipefail cd -- "$(dirname -- "$0")" . ../mod.bash install_pkg_packages - +install_termux_task tasks/logseq-sync +termux-setup-storage diff --git a/termux/tasks/logseq-sync b/termux/tasks/logseq-sync new file mode 100755 index 0000000..1066930 --- /dev/null +++ b/termux/tasks/logseq-sync @@ -0,0 +1,8 @@ +#!/bin/sh +set -e +cd ~/storage/shared/logseq +git pull +git add --all +if git commit -m update; then + git push +fi