From 26858a6513090fe4024857144df1c10ebc0ec69e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Austen=E2=80=9D?= Date: Sat, 26 Oct 2019 22:43:59 -0400 Subject: [PATCH] Add final touches to init.sh --- init.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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