From 4d91a6bbf561e485fbd870f992d6b088324bc317 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Wed, 30 Sep 2020 16:56:05 +0200 Subject: [PATCH] Refactor ci/build.sh by merging if statement bodies --- ci/build.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/ci/build.sh b/ci/build.sh index 1c520134a..211c2bcc8 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -28,24 +28,18 @@ if [ "${build_system}" = "cmake" ]; then cmake --build . cpack cd .. -else - if [ "${ID_LIKE}" = "debian" ]; then - tar xfz graphviz-${GV_VERSION}.tar.gz - (cd graphviz-${GV_VERSION}; fakeroot make -f debian/rules binary) | tee >(ci/extract-configure-log.sh >${META_DATA_DIR}/configure.log) - else - rm -rf ${HOME}/rpmbuild - rpmbuild -ta graphviz-${GV_VERSION}.tar.gz | tee >(ci/extract-configure-log.sh >${META_DATA_DIR}/configure.log) - fi -fi -if [ "${build_system}" = "cmake" ]; then if [ "${ID_LIKE}" = "debian" ]; then mv build/*.deb ${DIR}/os/${ARCH}/ fi else if [ "${ID_LIKE}" = "debian" ]; then + tar xfz graphviz-${GV_VERSION}.tar.gz + (cd graphviz-${GV_VERSION}; fakeroot make -f debian/rules binary) | tee >(ci/extract-configure-log.sh >${META_DATA_DIR}/configure.log) mv *.deb ${DIR}/os/${ARCH}/ mv *.ddeb ${DIR}/debug/${ARCH}/ else + rm -rf ${HOME}/rpmbuild + rpmbuild -ta graphviz-${GV_VERSION}.tar.gz | tee >(ci/extract-configure-log.sh >${META_DATA_DIR}/configure.log) mv ${HOME}/rpmbuild/SRPMS/*.src.rpm ${DIR}/source/ mv ${HOME}/rpmbuild/RPMS/*/*debuginfo*rpm ${DIR}/debug/${ARCH}/ mv ${HOME}/rpmbuild/RPMS/*/*.rpm ${DIR}/os/${ARCH}/ -- 2.40.0