-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
23 lines (19 loc) · 825 Bytes
/
setup.sh
File metadata and controls
23 lines (19 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
APT_PACKAGES='build-essential python3 python3-pip'
YUM_PACKAGES='wget curl tcpdump gcc gcc-c++ make python3-devel python3 python3-pip'
PIP_PACKAGES='scapy ipinfo'
has_apt() {
apt update && apt upgrade -y; apt-get install $APT_PACKAGES -y && pip3 install $PIP_PACKAGES; echo "alias pull='python3 pypull.py'" >> ~/.bashrc && echo "alias pull='python3 ~/pypull/pypull.py'" >> ~/.bashrc;
}
has_yum() {
yum update -y; yum install $YUM_PACKAGES -y && pip3 install $PIP_PACKAGES; echo "alias pull='python3 pypull.py'" >> ~/.bashrc && echo "alias pull='python3 ~/pypull/pypull.py'" >> ~/.bashrc;
}
package() {
[ -x "$(which $1)" ]
}
if package apt-get ; then has_apt
elif package yum ; then has_yum
else
echo 'Unknown package manager! Manual dependency installation required.'
exit 2
fi