Created
February 26, 2017 14:53
-
-
Save xluffy/4a63e549f5ce9c5c9b6400a0869ca65b to your computer and use it in GitHub Desktop.
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 | |
# | |
# Purpose: Install common package | |
# Author: @xluffy | |
# | |
# VAR | |
declare -a pkgs=(aptitude apt-transport-https apt-utils autoconf automake bash-completion bison | |
build-essential curl dialog dnsutils gcc git git-core htop iotop iputils-ping keychain | |
libacl1-dev libevent-dev libffi-dev libgdbm-dev liblzo2-dev libncurses5-dev libreadline6-dev | |
libsqlite3-dev libssl-dev libssl-dev libtool libxml2-dev libyaml-dev locales locate lynx make | |
man mtr-tiny nano ncdu net-tools ngrep openssh-server pkg-config python3-pip python-dev | |
python-pycurl python-software-properties rsync software-properties-common sqlite3 sudo | |
supervisor telnet tmux traceroute unattended-upgrades uuid-dev vim wget zlib1g-dev) | |
_log() { | |
echo -e "[LOG]" "[$(date +'%Y-%m-%d %H:%M:%S')]:" "$*" | |
} | |
_die() { | |
echo -e "[ERROR]" "[$(date +'%Y-%m-%d %H:%M:%S')]:" "$*" >&2 | |
exit 1 | |
} | |
_install() { | |
for pkg in "${pkgs[@]}"; do | |
apt-get install -y --no-install-recommends "${pkg}" || _die "$@" | |
done | |
} | |
main(){ | |
apt-get update -y | |
export RUNLEVEL=1 | |
export DEBIAN_FRONTEND=noninteractive | |
_install "$@" | |
} | |
main "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment