mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 08:00:14 +00:00
remove unused dotfiles
This commit is contained in:
@ -104,6 +104,5 @@ echo ""
|
||||
echo "consider running other scripts:"
|
||||
echo " - install_casks"
|
||||
echo " - configure_macos"
|
||||
echo " - install_python"
|
||||
echo " - install_rust"
|
||||
echo ""
|
||||
|
@ -1,53 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
PYTHON_VERSION=3.8.2
|
||||
DOTS=$(dirname "$0")/..
|
||||
cd "$DOTS" || (echo "Directory not found: $DOTS"; exit 1)
|
||||
DOTS="$PWD"
|
||||
|
||||
check_for_pyenv() {
|
||||
if ! (which pyenv > /dev/null)
|
||||
then
|
||||
echo ""
|
||||
echo "pyenv not found"
|
||||
if ! (/usr/local/bin/brew list | grep pyenv > /dev/null)
|
||||
then
|
||||
echo "pyenv not installed, run: bootstrap"
|
||||
echo ""
|
||||
else
|
||||
echo "pyenv is installed, run: setup_symlinks (and restart)"
|
||||
echo ""
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
echo "pyenv ✓"
|
||||
}
|
||||
|
||||
setup_python() {
|
||||
/usr/local/bin/pyenv install $PYTHON_VERSION --skip-existing
|
||||
/usr/local/bin/pyenv global $PYTHON_VERSION
|
||||
|
||||
echo "python $PYTHON_VERSION ✓"
|
||||
}
|
||||
|
||||
setup_python_envs() {
|
||||
for dir in "$DOTS"/python/*/
|
||||
do
|
||||
dir=${dir%*/}
|
||||
envname=$(basename "$dir")
|
||||
if ! (/usr/local/bin/pyenv versions | grep -w "$envname" > /dev/null)
|
||||
then
|
||||
/usr/local/bin/pyenv virtualenv "$PYTHON_VERSION" "$envname" > /dev/null
|
||||
fi
|
||||
# shellcheck source=/dev/null
|
||||
. "$HOME/.pyenv/versions/$envname/bin/activate"
|
||||
pip install --upgrade pip > /dev/null
|
||||
pip install -r "$dir/requirements.txt" > /dev/null
|
||||
deactivate
|
||||
echo " - venv: $envname ✓"
|
||||
done
|
||||
}
|
||||
|
||||
check_for_pyenv
|
||||
setup_python
|
||||
setup_python_envs
|
@ -1,40 +0,0 @@
|
||||
#!/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
|
@ -1,14 +0,0 @@
|
||||
#!/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
|
@ -1,40 +0,0 @@
|
||||
#!/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
|
@ -1,40 +0,0 @@
|
||||
#!/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