Updated install script
parent
f7f59469c2
commit
431b6e9bca
@ -1,19 +1,41 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
FILE=/lib/libncursest.so
|
FILE=/lib/libncursest.so
|
||||||
WORK_DIR="${PWD}"
|
work_dir="${PWD}"
|
||||||
CORES="$(nproc)"
|
cores="$(nproc)"
|
||||||
CURSES_URL="https://invisible-mirror.net/archives/ncurses/current/ncurses.tar.gz"
|
curses_url="https://invisible-mirror.net/archives/ncurses/current/ncurses.tar.gz"
|
||||||
if test -f "$FILE"; then
|
#if test -f "$FILE"; then
|
||||||
echo "$FILE exists; skipping ncurses compile."
|
# echo "$FILE exists; skipping ncurses compile."
|
||||||
else
|
#else
|
||||||
echo "$FILE does not exist, fetching and compiling ncurses source code now..."
|
# echo "$FILE does not exist, fetching and compiling ncurses source code now..."
|
||||||
mkdir ncurses
|
mkdir ncurses
|
||||||
wget -q -O- "${CURSES_URL}" | tar -xz -C ncurses
|
wget -q -O- "${curses_url}" | tar -xz -C ncurses
|
||||||
echo "Fetched ncurses source code from ${CURSES_URL}..."
|
echo "Fetched ncurses source code from ${curses_url}..."
|
||||||
cd ncurses/*/
|
cd ncurses/*/ || exit
|
||||||
echo "Runnning configure script..."
|
echo "Runnning configure script..."
|
||||||
./configure --with-pthread --with-shared > /dev/null
|
./configure --with-pthread --with-shared > /dev/null
|
||||||
echo "Running make..."
|
echo "Running make..."
|
||||||
make -j"${CORES}" > /dev/null
|
make -j"${cores}" > /dev/null
|
||||||
fi
|
#fi
|
||||||
|
if cmp --silent -- "./lib/libncursest.so" "/lib/libncursest.so"; then
|
||||||
|
echo "You have a version of ncurses that was identical to the one that was compiled."
|
||||||
|
echo " Quitting..."
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
echo "You have a different version of ncurses than the one that was just compiled."
|
||||||
|
read -p "Would you like to install the new version? [y/N] " userchoice
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$userchoice" = "Y" ]; then
|
||||||
|
echo "The program will now attempt to install the new version of ncurses (the one that was just compiled). In order to do this, the sudo password is required."
|
||||||
|
echo "Installing the new version of ncurses..."
|
||||||
|
sudo make install
|
||||||
|
echo "The new version has been installed. The program will now quit."
|
||||||
|
echo "Quitting..."
|
||||||
|
exit
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "You chose to not install the new ncurses version. This program will now quit."
|
||||||
|
echo "Quitting..."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue