2020-04-11 18:55:50 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
# container home
|
2020-04-11 19:18:22 +00:00
|
|
|
export HOME="/home/$U"
|
2020-04-11 18:55:50 +00:00
|
|
|
|
|
|
|
rsync -avP /home/template/ $HOME/
|
|
|
|
|
|
|
|
# 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)"
|