mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 16:10:14 +00:00
clean up bootstrap scripts and notes
This commit is contained in:
40
scripts/saved/backup_keybase
Executable file
40
scripts/saved/backup_keybase
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
setup_keybase() {
|
||||
KEYBASE_USER=$(keybase whoami || (echo "Please login to keybase first"; exit 1))
|
||||
keybase fs sync enable "/keybase/private/$KEYBASE_USER"
|
||||
|
||||
echo "keybase ✓"
|
||||
}
|
||||
|
||||
backup_keybase_ssh() {
|
||||
SSH_DIR="/Volumes/Keybase/private/$KEYBASE_USER/ssh"
|
||||
if [ -d "$SSH_DIR" ]
|
||||
then
|
||||
rsync -a ~/.ssh/ "$SSH_DIR"/
|
||||
|
||||
echo " - backed up to keybase: ssh ✓"
|
||||
else
|
||||
echo "Directory not found: $SSH_DIR"
|
||||
echo "Please check your keybase files"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
backup_keybase_aws() {
|
||||
AWS_DIR="/Volumes/Keybase/private/$KEYBASE_USER/aws"
|
||||
if [ -d "$AWS_DIR" ]
|
||||
then
|
||||
rsync -a ~/.aws/ "$AWS_DIR"/
|
||||
|
||||
echo " - backed up to keybase: aws ✓"
|
||||
else
|
||||
echo "Directory not found: $AWS_DIR"
|
||||
echo "Please check your keybase files"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
setup_keybase
|
||||
backup_keybase_ssh
|
||||
backup_keybase_aws
|
14
scripts/saved/install_ohmyzsh
Executable file
14
scripts/saved/install_ohmyzsh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
install_ohmyzsh() {
|
||||
if [ ! -d ~/.oh-my-zsh ]
|
||||
then
|
||||
printf "\ninstalling oh my zsh...\nremember to restart terminal afterwards\n\n"
|
||||
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
echo "installed ✓"
|
||||
}
|
||||
|
||||
install_ohmyzsh
|
40
scripts/saved/setup_keybase
Executable file
40
scripts/saved/setup_keybase
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
setup_keybase() {
|
||||
KEYBASE_USER=$(keybase whoami || (echo "Please login to keybase first"; exit 1))
|
||||
keybase fs sync enable "/keybase/private/$KEYBASE_USER"
|
||||
|
||||
echo "keybase ✓"
|
||||
}
|
||||
|
||||
setup_keybase_ssh() {
|
||||
SSH_DIR="/Volumes/Keybase/private/$KEYBASE_USER/ssh"
|
||||
if [ -d "$SSH_DIR" ]
|
||||
then
|
||||
rsync -a "$SSH_DIR"/ ~/.ssh/
|
||||
|
||||
echo " - keybase: ssh ✓"
|
||||
else
|
||||
echo "Directory not found: $SSH_DIR"
|
||||
echo "Please check your keybase files"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
setup_keybase_aws() {
|
||||
AWS_DIR="/Volumes/Keybase/private/$KEYBASE_USER/aws"
|
||||
if [ -d "$AWS_DIR" ]
|
||||
then
|
||||
rsync -a "$AWS_DIR"/ ~/.aws/
|
||||
|
||||
echo " - keybase: aws ✓"
|
||||
else
|
||||
echo "Directory not found: $AWS_DIR"
|
||||
echo "Please check your keybase files"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
setup_keybase
|
||||
setup_keybase_ssh
|
||||
setup_keybase_aws
|
40
scripts/saved/unused_bootstraps
Executable file
40
scripts/saved/unused_bootstraps
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
check_for_zsh() {
|
||||
if ! (echo "$SHELL" | grep zsh > /dev/null)
|
||||
then
|
||||
echo "Switch to using zsh before continuing"
|
||||
echo ""
|
||||
echo "MacOS Instructions:"
|
||||
echo "System Preferences > Users & Groups > Unlock"
|
||||
echo "Right-click on user, Advanced Options..."
|
||||
echo "Login shell: /bin/zsh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "zsh ✓"
|
||||
}
|
||||
|
||||
check_for_ohmyzsh() {
|
||||
if [ ! -d ~/.oh-my-zsh ]
|
||||
then
|
||||
echo "oh-my-zsh ✕"
|
||||
echo ""
|
||||
echo "Install oh-my-zsh before continuing"
|
||||
echo "You can run the script: install_ohmyzsh"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "oh-my-zsh ✓"
|
||||
}
|
||||
|
||||
install_spacemacs() {
|
||||
emacsdir=~/.emacs.d
|
||||
if ! (git -C "$emacsdir" pull > /dev/null 2>&1)
|
||||
then
|
||||
git clone -b develop https://github.com/syl20bnr/spacemacs "$emacsdir"
|
||||
fi
|
||||
|
||||
echo "spacemacs ✓"
|
||||
}
|
Reference in New Issue
Block a user