diff options
| author | Evan Klitzke <evan@eklitzke.org> | 2017-12-23 23:37:58 -0800 |
|---|---|---|
| committer | Evan Klitzke <evan@eklitzke.org> | 2017-12-24 00:05:46 -0800 |
| commit | 158d50e5fa0208d370e1bbd261f4777d46ebcd9f (patch) | |
| tree | 06a1c50d2d32f39b090708366c04ee6a1d15203c | |
| parent | 64ce0e62e230e9abfa7458ab21c5e178b1e14a1b (diff) | |
| download | monzero-gui-158d50e5fa0208d370e1bbd261f4777d46ebcd9f.tar.gz monzero-gui-158d50e5fa0208d370e1bbd261f4777d46ebcd9f.tar.xz monzero-gui-158d50e5fa0208d370e1bbd261f4777d46ebcd9f.zip | |
Teach build.sh to find qmake on systems where it's called qmake-qt5.
| -rwxr-xr-x | build.sh | 26 |
1 files changed, 23 insertions, 3 deletions
@@ -8,6 +8,22 @@ if [ -z $BUILD_TYPE ]; then BUILD_TYPE=release fi +# Return 0 if the command exists, 1 if it does not. +exists() { + command -v "$1" &>/dev/null +} + +# Return the first value in $@ that's a runnable command. +find_command() { + for arg in "$@"; do + if exists "$arg"; then + echo "$arg" + return 0 + fi + done + return 1 +} + if [ "$BUILD_TYPE" == "release" ]; then echo "Building release" CONFIG="CONFIG+=release"; @@ -64,8 +80,8 @@ if [ ! -d build ]; then mkdir build; fi # Platform indepenent settings if [ "$ANDROID" != true ] && ([ "$platform" == "linux32" ] || [ "$platform" == "linux64" ]); then - distro=$(lsb_release -is) - if [ "$distro" == "Ubuntu" ]; then + exists lsb_release && distro="$(lsb_release -is)" + if [ "$distro" = "Ubuntu" ] || [ "$distro" = "Fedora" ] || test -f /etc/fedora-release; then CONFIG="$CONFIG libunwind_off" fi fi @@ -85,7 +101,11 @@ popd echo "var GUI_MONERO_VERSION = \"$TAGNAME\"" >> version.js cd build -qmake ../monero-wallet-gui.pro "$CONFIG" || exit +if ! QMAKE=$(find_command qmake qmake-qt5); then + echo "Failed to find suitable qmake command." + exit 1 +fi +$QMAKE ../monero-wallet-gui.pro "$CONFIG" || exit $MAKE || exit # Copy monerod to bin folder |
