#!/bin/bash # Install required packages if [[ "$1" != "--install" ]]; then SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" FAKE_HOME="$SCRIPT_DIR/fake_home" dotdirs="$(find $FAKE_HOME -mindepth 1 -type d)" echo "$dotdirs" | while read -r dotdir; do new="$HOME${dotdir:${#FAKE_HOME}}" echo "mkdir -p $new" mkdir -p $new done dotfiles="$(find $FAKE_HOME -mindepth 1 -type f)" echo "$dotfiles" | while read -r dotfile; do new="$HOME${dotfile:${#FAKE_HOME}}" echo "$dotfile => $new" ln -sf "$dotfile" "$new" done touch "$HOME/.zsh_local" else echo -n "Rust is " if ! command -v cargo; then echo "not installed. Installing..." curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh else echo "installed." fi . "$HOME/.cargo/env" if command -v cargo; then cargo install bat fi curl -sS https://starship.rs/install.sh | sh echo "Starship requires an NFont: https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/FiraCode.zip" echo "You may wish to install fzf" fi