mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-11-09 22:19:45 +00:00
25 lines
544 B
Bash
Executable file
25 lines
544 B
Bash
Executable file
#!/bin/bash
|
|
|
|
DWMBAR="/usr/bin/dwmbar"
|
|
|
|
if [ "$EUID" -ne 0 ]
|
|
then echo "Please run as root" > /dev/stderr
|
|
exit 1
|
|
fi
|
|
|
|
if [[ ! -f "dwmbar" ]]; then
|
|
echo "dwmbar executable not found." > /dev/stderr
|
|
exit 1
|
|
fi
|
|
|
|
# Create /usr/share/dwmbar
|
|
# Containing example dwmbarrc and modules
|
|
|
|
mkdir --parents "/usr/share/dwmbar/"
|
|
|
|
cp -r "./modules" "/usr/share/dwmbar/modules"
|
|
cp -r "./dwmbarrc" "/usr/share/dwmbar/dwmbarrc"
|
|
|
|
echo "./dwmbar --> /usr/bin/dwmbar"
|
|
cp "./dwmbar" "/usr/bin/dwmbar"
|
|
[[ $? -eq 0 ]] && echo "Installation completed successfully"
|