Files
logseq-meta/android/logseq-gitea-init.sh
2025-05-18 17:20:31 +02:00

37 lines
1.5 KiB
Bash

#!/data/data/com.termux/files/usr/bin/bash
# setup termux storage first
/data/data/com.termux/files/usr/bin/termux-setup-storage
targetpath=/data/data/com.termux/files/home/storage/documents/
outoftermux=/storage/self/primary/Documents/
/data/data/com.termux/files/usr/bin/echo "Will be downloading to the target path (and subfolder logseq-gitea)"
/data/data/com.termux/files/usr/bin/echo $targetpath
/data/data/com.termux/files/usr/bin/echo "Path above is from the Termux perspective, from system perspective its:"
/data/data/com.termux/files/usr/bin/echo $outoftermux
/data/data/com.termux/files/usr/bin/echo "press enter for continue"
read
/data/data/com.termux/files/usr/bin/pkg update
/data/data/com.termux/files/usr/bin/pkg upgrade
/data/data/com.termux/files/usr/bin/pkg install git openssh
/data/data/com.termux/files/usr/bin/git config --global user.name "Stepan Kuklis"
/data/data/com.termux/files/usr/bin/git config --global user.email panpanika@gmail.com
/data/data/com.termux/files/usr/bin/mkdir -p ${targetpath}logseq-gitea
/data/data/com.termux/files/usr/bin/cd ${targetpath}logseq-gitea/
source /data/data/com.termux/files/usr/bin/source-ssh-agent
eval "$(/data/data/com.termux/files/usr/bin/ssh-agent -s)"
/data/data/com.termux/files/usr/bin/ssh-add ~/.ssh/logseq_id_rsa
/data/data/com.termux/files/usr/bin/git clone ssh://git@gitea.panpanika.eu:2222/panika-logseq/logseq.git
/data/data/com.termux/files/usr/bin/git config --global --add safe.directory ${targetpath}logseq-gitea/logseq