diff --git a/scripts/install_libcachesim.sh b/scripts/install_libcachesim.sh index 998669ff..a0920cdf 100755 --- a/scripts/install_libcachesim.sh +++ b/scripts/install_libcachesim.sh @@ -1,17 +1,12 @@ -#!/bin/bash +#!/bin/bash set -euo pipefail +SOURCE=$(readlink -f "${BASH_SOURCE[0]}") +DIR=$(dirname "${SOURCE}") -SORUCE=$(readlink -f ${BASH_SOURCE[0]}) -DIR=$(dirname ${SORUCE}) - -cd ${DIR}/../; -mkdir _build || true 2>/dev/null; -cd _build; -cmake -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_C_FLAGS="-Wall -Wextra -Werror -Wno-unused-variable -Wno-unused-function -Wno-unused-parameter -Wno-unused-but-set-variable -Wpedantic -Wformat=2 -Wformat-security -Wshadow -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Wredundant-decls -Wnested-externs -Wmissing-include-dirs" \ - -DCMAKE_CXX_FLAGS="-Wall -Wextra -Werror -Wno-unused-variable -Wno-unused-function -Wno-unused-parameter -Wno-unused-but-set-variable -Wpedantic -Wformat=2 -Wformat-security -Wshadow -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Wredundant-decls -Wnested-externs -Wmissing-include-dirs" \ - .. -make -j; -cd ${DIR}; - +cd "${DIR}"/../ +mkdir -p _build +cd _build +cmake .. +make -j +cd "${DIR}"