echo "#################################"
echo "##     Installing SSH Key.    ###"
echo "#################################"
echo -n "Enter your username on apollo: " 
read APOLLO
ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa <<< y
# apollo = 140.114.91.183
ssh-copy-id $APOLLO@140.114.91.183

# Install bashrc
git config --global http.sslverify false
curl -o ~/.bashrc https://apollo.cs.nthu.edu.tw/pp23/bashrc-remote
echo "source ~/.bashrc" >> ~/.bash_profile
curl -o ~/.git-prompt.sh https://apollo.cs.nthu.edu.tw/pp23/git-prompt.sh
echo "alias hw3-2-judge='hw3-2-judge --as $APOLLO'" >> ~/.bashrc
echo "alias hw3-3-judge='hw3-3-judge --as $APOLLO'" >> ~/.bashrc
echo "alias lab3-judge='lab3-judge --as $APOLLO'" >> ~/.bashrc
echo "alias lab4-judge='lab4-judge --as $APOLLO'" >> ~/.bashrc
pip3 install dataclasses > /dev/null

echo "###################################"
echo "##       Install completed      ###"
echo "## Please relogin the container ###"
echo "###################################"
