-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprovision-base.sh
46 lines (41 loc) · 960 Bytes
/
provision-base.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
set -euxo pipefail
# update the cache.
export DEBIAN_FRONTEND=noninteractive
apt-get update
# install vim.
apt-get install -y --no-install-recommends vim
cat >/etc/vim/vimrc.local <<'EOF'
syntax on
set background=dark
set esckeys
set ruler
set laststatus=2
set nobackup
EOF
# configure the shell.
cat >/etc/profile.d/login.sh <<'EOF'
[[ "$-" != *i* ]] && return
export EDITOR=vim
export PAGER=less
alias l='ls -lF --color'
alias ll='l -a'
alias h='history 25'
alias j='jobs -l'
EOF
cat >/etc/inputrc <<'EOF'
set input-meta on
set output-meta on
set show-all-if-ambiguous on
set completion-ignore-case on
"\e[A": history-search-backward
"\e[B": history-search-forward
"\eOD": backward-word
"\eOC": forward-word
EOF
# install and configure git.
apt-get install -y git-core
git config --global user.email 'rgl@ruilopes.com'
git config --global user.name 'Rui Lopes'
git config --global push.default simple
git config --global core.autocrlf false