work/build/runuser.sh

28 lines
617 B
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
env
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 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
# link in ssh key from original home
ln -s ~/.home/.ssh/id_rsa ~/.ssh/id_rsa
ln -s ~/.home/.ssh/id_rsa.pub ~/.ssh/id_rsa.pub
2020-04-11 19:18:22 +00:00
# move this to runtime FIXME
2020-04-11 18:55:50 +00:00
#DEVDIR="$( cd ~/.home/dev >/dev/null 2>&1 && pwd -P)"