Last active
August 13, 2020 12:53
-
-
Save tracphil/03de0b546e83372141aea36772ba844c to your computer and use it in GitHub Desktop.
Script to symlink my dotfiles from iCloud
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# cd ~/Library/Mobile\ Documents/com~apple~CloudDocs/Settings/dotfiles | |
if [[ ! -d ~/Library/Mobile\ Documents/com~apple~CloudDocs/Settings/dotfiles ]] | |
then | |
echo "${HOME}/Library/Mobile\ Documents/com~apple~CloudDocs/Settings/dotfiles does not exist!" | |
exit 1 | |
fi | |
mkdir -p ~/.vagrant.d | |
for i in .ssh .zsh* .config; do rm -rf ~/"$i"; done | |
rm -rf .aws/saml_cache* | |
for dotfile in $( ls -A1 | grep -Ev 'setup_dotfiles.sh|link.sh|bak' ) | |
do | |
# touch the file so it syncs locally from iCloud | |
touch ${dotfile} | |
ln -Ffs ~/Library/Mobile\ Documents/com~apple~CloudDocs/Settings/dotfiles/${dotfile} ~/${dotfile} | |
done | |
chmod 700 ~/.ssh | |
chmod 600 ~/.ssh/* | |
if [ -d ~/.ssh ]; then | |
rm -rf ~/.ssh/environment | |
rm -rf ~/.ssh/known_hosts | |
fi | |
mkdir ~/.pyenv | |
cat > ~/.pyenv/requirements.txt << PYENV | |
aws-google-auth | |
awscli | |
editorconfig | |
yamllint | |
pygments | |
PYENV | |
echo "Do this after install" | |
echo "" | |
echo "cd ~/.zinit/completions" | |
echo "wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/plugins/terraform/_terraform" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment