-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
32 lines (24 loc) · 727 Bytes
/
Copy pathinstall.sh
File metadata and controls
32 lines (24 loc) · 727 Bytes
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
#!/bin/bash
# install_ncursesw.sh
set -e
echo "Detecting Linux distro"
if [ -f /etc/debian_version ]; then
echo "Detected Debian/Ubuntu distro."
echo "Updating packages"
sudo apt update
echo "Installing"
sudo apt install -y libncursesw5 libncursesw5-dev
elif [ -f /etc/redhat-release ]; then
echo "Detected RedHat/Fedora/CentOS distro"
echo "Installing"
sudo dnf install -y ncurses ncurses-devel
elif [ -f /etc/arch-release ]; then
echo "Detected Arch Linux distro"
echo "Installing"
sudo pacman -Sy --noconfirm ncurses
else
echo "Distro not automatically detected"
echo "Manual install of ncursesw is needed"
exit 1
fi
echo "Installation completed successfully"