diff --git a/init.sh b/init.sh index 454c5ad..101a3b2 100755 --- a/init.sh +++ b/init.sh @@ -24,6 +24,10 @@ install_requirements() { get_debs install_debs fi + + if [[ ! -e ~/.ssh/id_ed25519 ]]; then + ssh-keygen -t ed25519 -N '' -f ~/.ssh/id_ed25519 + fi } get_debs() { wget "$DEBS_URL" -O "$DEBS_FNAME" @@ -84,7 +88,13 @@ install_complete() { cat <<-EOF + Installation complete! + + Your ssh key: + $(cat ~/.ssh/id_ed25519.pub) + Configure your excludes + ${EDITOR:-vim} "$BORGMATIC_EXCLUDES_FILE" To setup your repository, run: borgmatic init -e repokey-blake2 To make a backup, run: @@ -94,8 +104,7 @@ install_complete() { EOF } -cd "/data/data/com.termux/files/usr/tmp/tmp.k5RE3ly9Hm" -# cd "$(mktemp -d)" +cd "$(mktemp -d)" install_requirements install_templates "$1" install_complete