-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstalls.sh
executable file
·59 lines (53 loc) · 1.58 KB
/
installs.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
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
os=$($DIR/utils/os_detect.sh)
if [ "$os" = "mac" ]; then
which -s brew
if [[ $? != 0 ]] ; then
# Install Homebrew
#which -s ruby
#if [[ $? != 0 ]] ; then
# yum install
# Install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# this makes pbcopy work in tmux: https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
# taken from https://evertpot.com/osx-tmux-vim-copy-paste-clipboard/
# https://seancoates.com/blogs/remote-pbcopy/
brew install reattach-to-user-namespace -y
fi
ins="brew"
elif [ "$os" = "linux" ]; then
which -s yum
if [[ $? != 0 ]] ; then
ins="sudo apt-get"
else
ins="sudo yum"
fi
fi
# define dummy `sudo` for distribus. that don't have, e.g. debian
if ! hash sudo 2>/dev/null; then
sudo () {
$@
}
fi
# axel: multi-threaded downloader
# nload: network load
# ack: better grep
# entr: on file-change reloads command
# mosh: mobile shell: nearly perfect replacement for SSH
packages="ncat tree axel entr ag ack ack-grep silversearcher-ag
epel-release.noarch the_silver_searcher nload htop pigz mosh mobile-shell git
tmux zsh vim mlocate p7zip p7zip-plugins nc psmisc sysstat bind-utils net-tools
unrar unrar-free fd fzf whois wget trash"
echo "Using $ins"
if [ "$ins" = "sudo apt-get" ]; then
for p in $packages; do
$ins install $p -y
done
elif [ "$ins" = "brew" ]; then
for p in $packages; do
$ins install $p
done
else
$ins install $packages -y
fi