Skip to content

Instantly share code, notes, and snippets.

@sartan
Last active April 25, 2018 19:16
Show Gist options
  • Save sartan/1c67e033b84e832b2daeb91bd845a448 to your computer and use it in GitHub Desktop.
Save sartan/1c67e033b84e832b2daeb91bd845a448 to your computer and use it in GitHub Desktop.
pal dotnet ubuntu install script
#!/usr/bin/env bash
set -v
set -e
mkdir -p ~/workspace ~/dev ~/Downloads
sudo apt-get update
sudo apt-get install -y software-properties-common wget curl jq vim apt-transport-https
if [ ! -f /etc/apt/sources.list.d/cloudfoundry-cli.list ]; then
wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -
echo "deb http://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
fi
if [ ! -f /etc/apt/sources.list.d/vscode.list ]; then
wget -q -O - https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" | sudo tee /etc/apt/sources.list.d/vscode.list
fi
if [ ! -f /etc/apt/sources.list.d/dotnetdev.list ]; then
echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" | sudo tee /etc/apt/sources.list.d/dotnetdev.list
fi
MARIA_GREP_RESULT=`grep mariadb /etc/apt/sources.list; echo $?`
if [ "$MARIA_GREP_RESULT" == "1" ]; then
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] https://mirrors.evowise.com/mariadb/repo/10.1/ubuntu xenial main'
fi
sudo apt-get update
sudo apt-get install -y mariadb-server-10.1 git openjdk-8-jdk openjdk-8-source cf-cli maven rabbitmq-server graphviz redis-server nginx awscli curl code dotnet-sdk-2.1.4
sudo rabbitmq-plugins enable rabbitmq_management
if [ ! -d ~/dev/gradle ]; then
cd ~/Downloads
wget https://services.gradle.org/distributions/gradle-4.7-all.zip
unzip gradle-4.7-all.zip
mv gradle-4.7 ~/dev/gradle
fi
if [ ! -d ~/dev/flyway ]; then
cd ~/Downloads
wget https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/5.0.7/flyway-commandline-5.0.7-linux-x64.tar.gz
tar -xvf flyway-commandline-5.0.7-linux-x64.tar.gz
mv flyway-5.0.7 ~/dev/flyway
fi
PATH_GREP_RESULT=`grep "/dev:" ~/.bashrc; echo $?`
if [ "$PATH_GREP_RESULT" == "1" ]; then
echo "export PATH=\$PATH:\$HOME/dev:\$HOME/dev/gradle/bin:\$HOME/dev/flyway" >> ~/.bashrc
fi
gsettings set org.gnome.shell favorite-apps "['firefox.desktop', 'org.gnome.Nautilus.desktop', 'code.desktop', 'org.gnome.Terminal.desktop']"
gsettings set org.gnome.desktop.wm.keybindings activate-window-menu "[]"
gsettings set org.gnome.desktop.wm.keybindings begin-move "[]"
gsettings set org.gnome.desktop.wm.keybindings begin-resize "[]"
gsettings set org.gnome.desktop.wm.keybindings cycle-group "[]"
gsettings set org.gnome.desktop.wm.keybindings cycle-group-backward "[]"
gsettings set org.gnome.desktop.wm.keybindings cycle-panels "[]"
gsettings set org.gnome.desktop.wm.keybindings cycle-panels-backward "[]"
gsettings set org.gnome.desktop.wm.keybindings cycle-windows "[]"
gsettings set org.gnome.desktop.wm.keybindings cycle-windows-backward "[]"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-down "[]"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-last "[]"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-left "[]"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-right "[]"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-up "[]"
gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "[]"
gsettings set org.gnome.desktop.wm.keybindings show-desktop "['<Super>d']"
gsettings set org.gnome.desktop.wm.keybindings switch-input-source "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-panels "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-panels-backward "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-last "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up "[]"
gsettings set org.gnome.desktop.wm.keybindings toggle-maximized "[]"
gsettings set org.gnome.desktop.wm.keybindings unmaximize "['<Super>Down']"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment