2019-10-21 19:28:26 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
DWMBAR="/usr/bin/dwmbar"
|
|
|
|
|
2019-10-22 00:12:33 +00:00
|
|
|
if [ "$EUID" -ne 0 ]
|
2019-10-23 14:14:27 +00:00
|
|
|
then echo "Please run as root" > /dev/stderr
|
2019-10-22 22:08:33 +00:00
|
|
|
exit 1
|
2019-10-22 00:12:33 +00:00
|
|
|
fi
|
|
|
|
|
2019-10-21 19:28:26 +00:00
|
|
|
if [[ ! -f "dwmbar" ]]; then
|
2019-10-23 14:14:27 +00:00
|
|
|
echo "dwmbar executable not found." > /dev/stderr
|
|
|
|
exit 1
|
2019-10-21 19:28:26 +00:00
|
|
|
fi
|
|
|
|
|
2019-10-22 22:02:57 +00:00
|
|
|
# Create /usr/share/dwmbar
|
|
|
|
# Containing example dwmbarrc and modules
|
2019-10-21 19:28:26 +00:00
|
|
|
|
2019-10-22 22:02:57 +00:00
|
|
|
mkdir --parents "/usr/share/dwmbar/"
|
2019-10-21 19:28:26 +00:00
|
|
|
|
2019-10-22 22:02:57 +00:00
|
|
|
cp -r "./modules" "/usr/share/dwmbar/modules"
|
|
|
|
cp -r "./dwmbarrc" "/usr/share/dwmbar/dwmbarrc"
|
2019-10-21 19:40:41 +00:00
|
|
|
|
2019-10-22 22:02:57 +00:00
|
|
|
echo "./dwmbar --> /usr/bin/dwmbar"
|
|
|
|
cp "./dwmbar" "/usr/bin/dwmbar"
|
|
|
|
[[ $? -eq 0 ]] && echo "Installation completed successfully"
|