Created
July 5, 2017 13:58
-
-
Save andrefauth/5cdcabad85c2b737e9913d29ac305b77 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 | |
# | |
# Debian postinstall. | |
# Author: Diogo Alexsander Cavilha <[email protected]> | |
# | |
# su root | |
# ./postinstall | |
PS_USER="diogo" | |
PS_HOME="/home/$PS_USER" | |
PS_GIT_USER_NAME="Diogo Alexsander Cavilha" | |
PS_GIT_USER_EMAIL="[email protected]" | |
# SYSTEM CHANGES | |
#---------------------------------------- | |
cp -ivf /etc/apt/sources.list /etc/apt/sources.list.bkp | |
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" | |
alias docker.ps="docker ps --format \"table {{.Image}}\t{{.ID}}\t{{.Names}}\t{{.Status}}\t{{.Ports}}\" | sed -e 's/, /\n\t\t\t\t\t\t\t\t\t\t\t\t\t/g'" | |
EOF | |
touch $PS_HOME/.vimrc | |
cat >> $PS_HOME/.vimrc <<EOF | |
" ~/.vimrc | |
" Author: Diogo Alexsander Cavilha <[email protected]> | |
" 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 | |
touch $PS_HOME/.fonts.conf | |
cat >> $PS_HOME/.fonts.conf <<EOF | |
<?xml version='1.0'?> | |
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> | |
<fontconfig> | |
<match target="font"> | |
<edit mode="assign" name="rgba"> | |
<const>rgb</const> | |
</edit> | |
</match> | |
<match target="font"> | |
<edit mode="assign" name="hinting"> | |
<bool>true</bool> | |
</edit> | |
</match> | |
<match target="font"> | |
<edit mode="assign" name="hintstyle"> | |
<const>hintslight</const> | |
</edit> | |
</match> | |
<match target="font"> | |
<edit mode="assign" name="antialias"> | |
<bool>true</bool> | |
</edit> | |
</match> | |
<match target="font"> | |
<edit mode="assign" name="lcdfilter"> | |
<const>lcddefault</const> | |
</edit> | |
</match> | |
</fontconfig> | |
EOF | |
# INSTALLING PACKAGES | |
#---------------------------------------- | |
# From: https://wiki.debian.org/ath9k_htc | |
echo -e "\n\n==> Installing Atheros Driver (TP-LINK TL-WN721N)...\n" | |
echo -e "\n# Atheros Driver (TP-LINK TL-WN721N)" >> /etc/apt/sources.list | |
echo "deb http://httpredir.debian.org/debian/ jessie main contrib non-free" >> /etc/apt/sources.list | |
aptitude update && aptitude install -y firmware-atheros | |
echo -e "\n\n==> Installing Spotify...\n" | |
echo -e "\n# Spotify" >> /etc/apt/sources.list | |
echo "deb http://repository.spotify.com stable non-free" >> /etc/apt/sources.list | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D2C19886 | |
aptitude update && 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 | |
# dpkg -i libgcrypt11_1.5.4-3_amd64.deb | |
# rm -f libgcrypt11_1.5.4-3_amd64.deb | |
aptitude install -y vim \ | |
debian-reference \ | |
software-properties-common python-software-properties \ | |
xchm \ | |
git gitk \ | |
meld \ | |
gdebi \ | |
terminator \ | |
vlc \ | |
tree \ | |
flashplugin-nonfree \ | |
gnome-themes-standard \ | |
youtube-dl \ | |
screenfetch \ | |
libav-tools \ | |
fortune fortunes-debian-hints \ | |
htop \ | |
gource \ | |
curl \ | |
xsel \ | |
lynx \ | |
fbreader | |
echo -e "\n\n==> Installing docker...\n" | |
wget -qO- https://get.docker.com/ | sh | |
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 | |
wget https://launchpad.net/~ravefinity-project/+archive/ubuntu/ppa/+files/ambiance-flat-colors_16.04.1~xenial~NoobsLab.com_all.deb | |
sudo dpkg -i ambiance-flat-colors_16.04.1~xenial~NoobsLab.com_all.deb && rm ambiance-flat-colors_16.04.1~xenial~NoobsLab.com_all.deb | |
# 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" | |
# Sublime packages | |
#---------------------------------------- | |
echo -e "\n\n SUBLIME PACKAGES..." | |
echo -e "\nColorSchemeSelector" | |
echo -e "\nGit" | |
echo -e "\nGitGutter" | |
echo -e "\nPhalconPHP Completions" | |
echo -e "\nPHP Completions Kit" | |
echo -e "\nSidebar Enhancements" | |
echo -e "\nSQL Beautifier" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment