forked from guille/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·125 lines (104 loc) · 3.2 KB
/
install
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!/usr/bin/env bash
COLOR='\033[0;32m'
NC='\033[0m' # No Color
command_exists () {
type "$1" &> /dev/null ;
}
infoprint () {
echo -e "${COLOR}${1}${NC}"
}
aur_dl () {
\curl -L -O "https://aur.archlinux.org/cgit/aur.git/snapshot/$1.tar.gz"
}
install_sublime_repo () {
infoprint "Installing sublime text GPG key and repository"
\curl -O https://download.sublimetext.com/sublimehq-pub.gpg && sudo pacman-key --add sublimehq-pub.gpg && sudo pacman-key --lsign-key 8A8F901A && rm sublimehq-pub.gpg
echo -e "\n[sublime-text]\nServer = https://download.sublimetext.com/arch/stable/x86_64" | sudo tee -a /etc/pacman.conf
}
# If we can't find sublime-text, add the repository
pacman -Ss sublime-text &> /dev/null || install_sublime_repo
# Select the right install command and update system
INSTALL="sudo pacman -Syu --needed --noconfirm --noprogressbar"
# Install zsh and set it as default shell
if command_exists zsh; then
infoprint "zsh already installed"
else
$INSTALL zsh
chsh -s /bin/zsh
fi
infoprint "Installing programs from source/apps"
xargs -a <(cat sources/apps | \grep -v '^#') $INSTALL
# RUBY
if command_exists rvm; then
infoprint "rvm already installed"
infoprint "updating rvm..."
rvm get stable 1> /dev/null
infoprint "updating rubygems..."
gem update --system -q
infoprint "updating installed gems..."
gem update -q
else
infoprint "Installing rvm"
\curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm install ruby-head
#rvm install jruby-head
rvm use --default ruby-head
infoprint "Installing gems"
xargs -a <(cat sources/gems) gem install
fi
# PYTHON
infoprint "Installing pip packages"
xargs -a <(cat sources/pip) pip install --user -qq
# YARN
infoprint "Installing yarn packages"
yarn global upgrade
xargs -a <(cat sources/yarn) yarn global add --silent
# ELIXIR - hex
infoprint "Installing/upgrading hex"
mix local.hex
# ELIXIR - phoenix
# mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez
# nvim
mkdir -p ~/.config/nvim/colors
# MPD and NCMPCPP
mkdir -p ~/.mpd/lyrics
mkdir -p ~/.mpd/playlists
mkdir -p ~/.ncmpcpp
touch ~/.mpd/mpd.log
touch ~/.mpd/tag_cache
touch ~/.mpd/mpdstate
touch ~/.mpd/mpd.pid
touch ~/.mpd/sticker.sql
# Install aurman
if command_exists aurman; then
infoprint "aurman already installed"
else
mkdir temp
cd temp
aur_dl aurman
tar -xvf aurman*
cd aurman
makepkg -si --skippgpcheck
cd ../..
rm -rf temp
fi
# Install AUR packages
xargs -a <(cat sources/aur | \grep -v '^#') aurman -S --needed --noconfirm --noprogressbar
infoprint "Setting spanish keyboard"
localectl set-x11-keymap es
infoprint "Creating symbolic links..."
source links
# Create to-do list
infoprint "Creating a to-do file with more possible configurations..."
echo "* lxappearance: Arc-Darker + Papirus" >> todo
echo "* Install package control for Sublime" >> todo
echo " * Install Agila" >> todo
echo " * Install AllAutoComplete" >> todo
echo " * Install BracketHighlighter" >> todo
echo " * Install Crystal" >> todo
echo " * Install Elixir" >> todo
echo " * Install Kotlin" >> todo
echo " * Install Babel" >> todo
echo " * Install Rust Enhanced" >> todo
echo " * Install SublimeLinter, -annotations, -contrib-elixirc, -ruby" >> todo