work/build/run.sh

45 lines
793 B
Bash
Raw Normal View History

2020-04-11 17:53:41 +00:00
#!/bin/bash
2020-04-11 19:18:22 +00:00
echo "##### build/run.sh"
set -x
2020-04-11 17:53:41 +00:00
TD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"
cd "$TD"
apt install -y $(cat packages.txt)
2020-04-11 18:55:50 +00:00
SSH_HOST_KEY_FILES="
ssh_host_ecdsa_key
ssh_host_ecdsa_key.pub
ssh_host_ed25519_key
ssh_host_ed25519_key.pub
ssh_host_rsa_key
ssh_host_rsa_key.pub
"
for FN in $SSH_HOST_KEY_FILES ; do
ln -s /hostroot/etc/ssh/$FN /etc/ssh/$FN
done
2020-04-11 19:18:22 +00:00
ln -s /hostroot/root /root/.home
2020-04-11 18:55:50 +00:00
# install other stuff here
2020-04-11 19:27:32 +00:00
pip3 install -U pip
pip3 install black
2020-04-11 18:55:50 +00:00
# install python packages
# install yarn
# install prettier
# install vim-go
2020-04-11 20:05:48 +00:00
echo chown -Rv $UID_TO_ADD:$GID_TO_ADD /home/user
chown -Rv $UID_TO_ADD:$GID_TO_ADD /home/user
2020-04-11 19:50:52 +00:00
sudo \
--set-home \
--non-interactive \
-u $USERNAME_TO_ADD \
2020-04-11 20:05:48 +00:00
bash ./user.sh