Created
February 26, 2017 14:38
-
-
Save borjao-dev/794776b50ea167f0a17d475a6142ca69 to your computer and use it in GitHub Desktop.
Debian script configuration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Author: Diogo Alexsander Cavilha <diogocavilha@gmail.com> | |
| # | |
| # Debian postinstall. | |
| # sudo ./postinstall | |
| PS_USER="diogo" | |
| PS_HOME="/home/$PS_USER" | |
| PS_GIT_USER_NAME="Diogo Alexsander Cavilha" | |
| PS_GIT_USER_EMAIL="diogocavilha@gmail.com" | |
| # SYSTEM CHANGES | |
| #---------------------------------------- | |
| sudo cp -ivf /etc/apt/sources.list /etc/apt/sources.list.bkp | |
| sudo cp -ivf $PS_HOME/.bashrc $PS_HOME/.bashrc.bkp | |
| sed -i 's/#force_color_prompt=yes/force_color_prompt=yes/' $PS_HOME/.bashrc && . $PS_HOME/.bashrc | |
| cat >> $PS_HOME/.bashrc <<EOF | |
| alias ggource="gource -f --seconds-per-day 80 --auto-skip-seconds 0.1 --file-idle-time 500 --max-files 500 --multi-sampling -1280x720 --stop-at-end --elasticity 0.1 -b 000000 --hide filenames,dirnames --disable-progress --user-friction .2 --disable-bloom --key --highlight-users" | |
| alias pcat="pygmentize -f terminal256 -O style=native -g" | |
| alias bash-reload="source ~/.bashrc" | |
| alias x="chmod +x" | |
| EOF | |
| touch $PS_HOME/.vimrc | |
| cat >> $PS_HOME/.vimrc <<EOF | |
| " ~/.vimrc | |
| " Author: Diogo Alexsander Cavilha <diogocavilha@gmail.com> | |
| " Date: 03/19/2012 | |
| syntax on | |
| set nu | |
| set magic | |
| set autoindent | |
| set et | |
| set ignorecase | |
| set ts=4 | |
| set bg=dark | |
| set fileencoding=utf-8 | |
| autocmd FileType php set omnifunc=phpcomplete#CompletePHP | |
| autocmd Filetype gitcommit setlocal spell textwidth=72 | |
| EOF | |
| # INSTALLING PACKAGES | |
| #---------------------------------------- | |
| # From: https://wiki.debian.org/ath9k_htc | |
| echo -e "\n\n==> Installing Atheros Driver (TP-LINK TL-WN721N)...\n" | |
| sudo echo -e "\n# Atheros Driver (TP-LINK TL-WN721N)" >> /etc/apt/sources.list | |
| sudo echo "deb http://httpredir.debian.org/debian/ jessie main contrib non-free" >> /etc/apt/sources.list | |
| sudo aptitude update | |
| sudo aptitude install -y firmware-atheros | |
| echo -e "\n\n==> Installing Spotify...\n" | |
| sudo echo -e "\n# Spotify" >> /etc/apt/sources.list | |
| sudo echo "deb http://repository.spotify.com stable non-free" >> /etc/apt/sources.list | |
| sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D2C19886 | |
| sudo aptitude update | |
| sudo aptitude install -y spotify-client | |
| # Case: spotify: error while loading shared libraries: libgcrypt.so.11: cannot open shared object file: No such file or directory | |
| wget http://mirrors.ocf.berkeley.edu/tanglu/pool/main/libg/libgcrypt11/libgcrypt11_1.5.4-3_amd64.deb | |
| sudo dpkg -i libgcrypt11_1.5.4-3_amd64.deb | |
| sudo rm -f libgcrypt11_1.5.4-3_amd64.deb | |
| sudo aptitude install -y vim \ | |
| debian-reference \ | |
| software-properties-common python-software-properties \ # PPA Manager | |
| xchm \ # Reading offline docs | |
| git gitk \ | |
| meld \ | |
| gdebi \ | |
| terminator \ | |
| vlc \ | |
| tree \ | |
| flashplugin-nonfree \ | |
| gnome-themes-standard \ | |
| youtube-dl \ | |
| screenfetch \ | |
| libav-tools \ | |
| fortune fortunes-debian-hints \ | |
| htop \ | |
| gource \ | |
| curl | |
| #shutter #Screenshot capture \ | |
| #php5 \ | |
| #php-pear && sudo pear install PHP_CodeSniffer && sudo pear install --alldeps php_codesniffer \ | |
| # curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
| echo -e "\n\n==> Installing docker...\n" | |
| sudo wget -qO- https://get.docker.com/ | sh | |
| sudo docker -v | |
| echo -e "\n\n==> Installing docker-compose...\n" | |
| url_download="https://github.com/docker/compose/releases/download/1.8.1/docker-compose-$(uname -s)-$(uname -m)" | |
| curl -L $url_download > /usr/local/bin/docker-compose && \ | |
| chmod +x /usr/local/bin/docker-compose | |
| docker-compose -v | |
| echo -e "\n\n==> Installing Fancy Git...\n" | |
| git clone https://github.com/diogocavilha/fancy-git.git $PS_HOME/.fancy-git \ | |
| && echo ". $PS_HOME/.fancy-git/main.sh" >> $PS_HOME/.bashrc \ | |
| && . $PS_HOME/.bashrc | |
| # POST-INSTALL INSTRUCTIONS | |
| #---------------------------------------- | |
| echo -e "\ngit config --global user.name \"$PS_GIT_USER_NAME\"" | |
| echo -e "\ngit config --global user.email \"$PS_GIT_USER_EMAIL\"" | |
| echo -e "\ngit config --global color.ui auto" | |
| echo -e "\ngit config --global core.editor \"vim\"" | |
| echo -e "\ngit config --global diff.tool meld" | |
| echo -e "\ngit config --global push.default simple" | |
| echo -e "\ngit config --global mergetool.keepBackup false" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment