mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 22:12:56 +00:00
41 lines
875 B
Bash
Executable File
41 lines
875 B
Bash
Executable File
#!/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
|