work/build/user.sh

52 lines
1.2 KiB
Bash
Raw Normal View History

2020-04-11 18:55:50 +00:00
#!/bin/bash
2020-04-11 19:27:32 +00:00
set -x
2020-04-11 18:55:50 +00:00
TD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"
2020-04-11 19:18:22 +00:00
U="$USERNAME_TO_ADD"
2020-04-11 23:11:49 +00:00
export LC_ALL=en_US
export LANG=en_US.UTF-8
2020-04-11 18:55:50 +00:00
# original home
2020-04-11 19:18:22 +00:00
OH="/hosthome"
2020-04-11 18:55:50 +00:00
# link ~/.home to original home
2020-04-11 19:18:22 +00:00
ln -s "/hosthome" $HOME/.home
2020-04-11 18:55:50 +00:00
# oh-my-zsh
curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh > /tmp/installomz.sh
export ZSH="$HOME/.zsh"
bash /tmp/installomz.sh --unattended --keep-zshrc
2020-04-11 20:55:42 +00:00
# vim-plug
# this should happen from vimrc
#curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
# https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
2020-04-11 20:55:42 +00:00
2020-04-11 18:55:50 +00:00
# link in ssh key from original home
2020-04-11 20:05:48 +00:00
mkdir -p ~/.ssh
2020-04-11 23:11:49 +00:00
ln -s ~/.home/Documents/sync/secrets/ssh/pixel16/id_rsa ~/.ssh/id_rsa
ln -s ~/.home/Documents/sync/secrets/ssh/pixel16/id_rsa.pub ~/.ssh/id_rsa.pub
2020-04-11 18:55:50 +00:00
# install pyenv
2020-04-11 23:11:49 +00:00
git clone -n https://github.com/pyenv/pyenv.git ~/.pyenv
pushd ~/.pyenv
git checkout 3e0f5e798ca16cd9389c4c8805038ac2c0d45cae
popd
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
pyenv install 3.8.2
git clone -n https://github.com/nvm-sh/nvm.git ~/.nvm
pushd ~/.nvm
git checkout 73438e339e242fce0cba443e5c4322ac996e9197
popd
2020-04-11 23:43:53 +00:00
export NVM_DIR="$HOME/.nvm"
2020-04-11 23:11:49 +00:00
source "$NVM_DIR/nvm.sh"
2020-04-11 23:11:49 +00:00
nvm install node