-
Notifications
You must be signed in to change notification settings - Fork 16
/
install.sh
76 lines (59 loc) · 2.03 KB
/
install.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
UNAME=$(uname)
if [ "$UNAME" == "Linux" ] ; then
currentPath=$PWD
pkgs=(epel-release wget unzip curl git)
if [ -f /etc/redhat-release ]; then
sudo yum update -y
for pkg in "${pkgs[@]}"; do
if ! type $pkg >/dev/null ; then
sudo yum install $pkg -y
fi
done
if ! type php >/dev/null ; then
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
sudo yum -y --enablerepo=remi-php74 install php
sudo yum -y --enablerepo=remi-php74 install php-{xml,soap,xmlrpc,mbstring,json,gd,mcrypt,zip,xsl,curl}
fi
if ! type go >/dev/null ; then
sudo yum install golang -y
fi
fi
if [ -f /etc/lsb-release ]; then
sudo apt-get update -y
for pkg in "${pkgs[@]}"; do
if ! type $pkg >/dev/null ; then
sudo apt-get install $pkg -y
fi
done
if ! type php >/dev/null ; then
sudo apt -y install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get -y install php7.4
sudo apt-get install -y php7.4-{bcmath,bz2,intl,gd,mbstring,mysql,zip,common,xml,soap,xmlrpc,json,xsl,curl}
fi
if ! type go >/dev/null ; then
sudo apt-get install golang -y
fi
fi
if ! type composer >/dev/null ; then
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
HASH="$(wget -q -O - https://composer.github.io/installer.sig)"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
fi
elif [[ "$UNAME" == CYGWIN* || "$UNAME" == MINGW* ]] ; then
echo "Windows"
fi
export COMPOSER_ALLOW_SUPERUSER=1; composer show;
composer update
cd $currentPath/package/hakrawler && go run main.go -v
cd $currentPath/package/httpx && go run main.go -version
cd $currentPath/package/subfinder && go run main.go -v
cd $currentPath
echo -e "\e[92mFinished Install\e[0m\n"
echo -e "\e[33mGo: \e[0m"
go version
echo -e "\e[33mPHP: \e[0m"
php -v