Warning, file /education/ktouch/build-install-run was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #!/bin/sh 0002 0003 # Usage: ./build-install-run [BUILD_TYPE] 0004 0005 set -e 0006 0007 if [ -z "$1"]; then 0008 BUILD_TYPE=Debug 0009 else 0010 BUILD_TYPE=$1 0011 fi 0012 0013 BASEDIR=`readlink -f -- .` 0014 BUILDDIR=${BASEDIR}/build/$BUILD_TYPE 0015 INSTALLDIR=${BASEDIR}/install/$BUILD_TYPE 0016 0017 CMAKE_ARGS="-DCMAKE_INSTALL_PREFIX=${INSTALLDIR} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DKDE_INSTALL_PREFIX_SCRIPT=ON ../.." 0018 0019 # Use ninja instead of make if command is available 0020 if [ -x "$(command -v ninja)" ]; then 0021 CMAKE_ARGS="${CMAKE_ARGS} -GNinja" 0022 fi 0023 0024 echo "Configuring build in '${BUILDDIR}' ... " 0025 mkdir -p $BUILDDIR 0026 cd $BUILDDIR 0027 cmake $CMAKE_ARGS 0028 0029 echo "Building in '${BUILDDIR}' ... " 0030 cmake --build . 0031 0032 echo "Installing to '${INSTALLDIR}' ... " 0033 cmake --build . --target install 0034 0035 echo "Running KTouch ... " 0036 . ${INSTALLDIR}/prefix.sh 0037 ${INSTALLDIR}/bin/ktouch