1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-11 13:50:56 -05:00
polybar/common/travis/install_xcb_xrm.sh
patrick96 747cdfe7f5 refactor(travis): Add minimal build configuration
Uses none of the optional dependencies. This ensures that polybar can
build without any of the supposedly optional dependencies. This would
have detected the cause of the xrm build failure before it was merged
2018-06-18 11:49:31 +02:00

26 lines
663 B
Bash
Executable file

#!/bin/bash
# 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
# Fail on error
set -e
# If the Makefile exists, we have already cached xrm
if [ ! -e "${DEPS_DIR}/xcb-util-xrm/Makefile" ]; then
git clone --recursive https://github.com/Airblader/xcb-util-xrm
fi
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
}