From d5bb526d84bf855d640c8dbb9b7eae66748a202f 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 --- termux/install | 7 +++++++ termux/tasks/logseq-sync | 8 ++++++++ 2 files changed, 15 insertions(+) create mode 100755 termux/tasks/logseq-sync diff --git a/termux/install b/termux/install index 65394e9..d598440 100755 --- a/termux/install +++ b/termux/install @@ -9,4 +9,11 @@ function install_pkg_packages() { pkg install -y "${packages[@]}" } +function install_termux_task() { + mkdir -p ~/.shortcuts/tasks + install -v "$1" ~/.shortcuts/tasks/ +} + 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