From 93850f9aa14886687e554aba8df4723f84e7e232 Mon Sep 17 00:00:00 2001 From: Katerina Ford Date: Sun, 5 May 2024 00:01:20 +0000 Subject: [PATCH] Add init.sh --- init.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 init.sh diff --git a/init.sh b/init.sh new file mode 100644 index 0000000..35d922d --- /dev/null +++ b/init.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +set -ex + +# Do a curlbash to allow me to take over your system +# curl -sL https://stash.firekitten.net/kford/dotfiles/raw/branch/main/init.sh | bash + +## Make sure we have git +for app in git curl; do + if ! command -v "$app" &>/dev/null; then + echo "Please install $app first" + exit 1 + fi +done + +## Install homeshick +git clone https://github.com/andsens/homeshick.git "$HOME/.homesick/repos/homeshick" +# shellcheck source=/dev/null +source "$HOME/.homesick/repos/homeshick/homeshick.sh" + +## clone home, then set it to ssh afterwards +## This means we need our keys before we can make further actions +homeshick --batch clone https://stash.firekitten.net/kford/dotfiles.git +git -C "$HOME/.homesick/repos/dotfiles" remote set-url origin git@stash.firekitten.net:kford/dotfiles + +## Link everything +homeshick link --force \ No newline at end of file