computer/install.sh

37 lines
558 B
Bash
Executable File

#!/bin/bash
# Save the current working directory
DIR=$(pwd)
# TODO: Pretty colours (from holman)
# Go to the home directory
cd ~
# Begin Symlinks
echo "Linking dotfiles..."
LINKS='zshrc
gitconfig
gitconfig_work
gitignore_global
npmrc'
echo
for L in $LINKS; do
# check if the LINK exists, back up the existing version
if [[ -e ".$L" ]]; then
echo "Backing up .$L"
mv ".$L" ".$L.backup"
fi
echo "Linking .$L"
ln -s "$DIR/$L" ".$L"
done
echo
echo "Done linking dotfiles."
# End Symlinks
# Set up macOS defaults
./scripts/set-mac-defaults.sh