2017-01-19 21:30:03 -05:00
|
|
|
#!/bin/bash
|
2018-05-12 11:00:56 -04:00
|
|
|
|
2018-05-19 11:13:23 -04:00
|
|
|
# Don't install xrm on minimal builds because it is an optional dependency
|
|
|
|
if [ "$POLYBAR_BUILD_TYPE" == "minimal" ]; then
|
|
|
|
echo "Not installing xcb-xrm on minimal build"
|
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
|
2018-05-12 11:00:56 -04:00
|
|
|
# Fail on error
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# If the Makefile exists, we have already cached xrm
|
|
|
|
if [ ! -e "${DEPS_DIR}/xcb-util-xrm/Makefile" ]; then
|
2017-01-19 21:30:03 -05:00
|
|
|
git clone --recursive https://github.com/Airblader/xcb-util-xrm
|
|
|
|
fi
|
2018-05-12 11:00:56 -04:00
|
|
|
|
|
|
|
cd xcb-util-xrm
|
|
|
|
|
|
|
|
# Install xrm on the system
|
|
|
|
# If that doesn't work for some reason (not yet compiled, corrupt cache)
|
|
|
|
# we compile xrm and try to install it again
|
|
|
|
sudo make install || {
|
|
|
|
./autogen.sh --prefix=/usr --libdir=/usr/lib
|
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
}
|