-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.sh
executable file
·27 lines (26 loc) · 961 Bytes
/
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
#!/usr/bin/env bash
red=$'\e[1;31m'
grn=$'\e[1;32m'
yel=$'\e[1;33m'
blu=$'\e[1;34m'
mag=$'\e[1;35m'
cyn=$'\e[1;36m'
end=$'\e[0m'
printf "%s\n" "${yel}We need super powers to help you.${end}";
rm -rf ./build
mkdir ./build
cd ./build
sudo apt-get install php-cli php-pear php-dev libncurses5-dev ncurses-doc libncursesw5-dev php-mbstring
wget https://pecl.php.net/get/ncurses-1.0.2.tgz \
&& tar -zxvf ncurses-1.0.2.tgz \
&& wget "https://bugs.php.net/patch-display.php?bug_id=71299&patch=ncurses-php7-support-again.patch&revision=1474549490&download=1" -O ncurses.patch \
&& mv ncurses-1.0.2 ncurses-php5 \
&& patch --strip=0 --verbose --ignore-whitespace < ncurses.patch \
&& cd ./ncurses-php5 \
&& phpize \
&& ./configure --enable-ncursesw \
&& make \
&& sudo make install
cd ../../ && rm -rf ./build/
printf "\n\n\n"
printf "%s\n" "${yel}!!!${end} Please, don't forget to add '${yel}extension${end}=${cyn}ncurses.so${end}' to your php.ini ${yel}!!!${end}"