Skip to content

Instantly share code, notes, and snippets.

@IlIlIlIl
Last active July 14, 2018 08:41
Show Gist options
  • Save IlIlIlIl/b589fab3acec8007cb7ebcaf691df482 to your computer and use it in GitHub Desktop.
Save IlIlIlIl/b589fab3acec8007cb7ebcaf691df482 to your computer and use it in GitHub Desktop.
script for initial enviroment setup
#!/bin/bash -eu
sudo echo ""
echo "Is server? [y/N]: "
read IS_SERVER
echo "have systrade? [y/N]: "
read HAVE_SYSTRAGE
echo "have chinachu? [y/N]: "
read HAVE_CHINACHU
echo "Is for work? [y/N]: "
read IS_FOR_WORK
ssh-keygen -t rsa -b 4096
echo "Please, C&P your bitbucket/gitlab account."
cat ${HOME}/.ssh/id_rsa.pub
echo "Press any key."
read TMP
# Install git, ghq
sudo apt-get install -y git
wget -P /tmp https://github.com/motemen/ghq/releases/download/v0.7.4/ghq_linux_amd64.zip
unzip -o /tmp/ghq_linux_amd64.zip
sudo cp /tmp/ghq /usr/local/bin
rm /tmp/ghq_linux_amd64.zip
ghq get [email protected]:purple.navy2016/init2.git
cd ${HOME}/.ghq/gitlab.com/purple.navy2016/init2
[ ${IS_SERVER} = 'y' ] && touch log/server
[ ${HAVE_SYSTRAGE} = 'y' ] && touch log/systrade
[ ${HAVE_CHINACHU} = 'y' ] && touch log/chinachu
[ ${IS_FOR_WORK} = 'y' ] && touch log/work
./entrypoint/start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment