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