Skip to content

Commit

Permalink
replaced save_cd with safe_cd
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhav-hexa committed Jan 13, 2021
1 parent 017b04f commit 16ee16c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export CC=${LLVM_INSTALL_DIR}/bin/clang
export CXX=${LLVM_INSTALL_DIR}/bin/clang++

mkdir -p "${PHASAR_DIR}"/build
save_cd "${PHASAR_DIR}"/build
safe_cd "${PHASAR_DIR}"/build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release "${BOOST_PARAMS}" -DPHASAR_BUILD_UNITTESTS=${DO_UNIT_TEST} "${PHASAR_DIR}"
cmake --build .

Expand All @@ -151,7 +151,7 @@ echo "phasar successfully built"
echo "install phasar..."
sudo cmake -DCMAKE_INSTALL_PREFIX=${PHASAR_INSTALL_DIR} -P cmake_install.cmake
sudo ldconfig
save_cd ..
safe_cd ..
echo "phasar successfully installed to ${PHASAR_INSTALL_DIR}"


Expand Down
10 changes: 5 additions & 5 deletions utils/init-submodules-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
source ./safeCommandsSet.sh

if git submodule status 2>&1 | grep -iq "fatal: Not a git repository (or any of the parent directories): .git"; then
save_cd "$(dirname "$0")"/../external/
safe_cd "$(dirname "$0")"/../external/
git clone [email protected]:google/googletest.git
save_cd googletest/
safe_cd googletest/
git checkout release-1.8.0
save_cd -
safe_cd -
git clone [email protected]:nlohmann/json.git
save_cd json/
safe_cd json/
git checkout v3.4.0
save_cd -
safe_cd -
git clone https://github.com/pdschubert/WALi-OpenNWA.git
fi
4 changes: 2 additions & 2 deletions utils/install-llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ if [ ! -d "${build_dir}/llvm-project" ]; then
fi

echo "Building LLVM..."
save_cd "${build_dir}"/llvm-project/
safe_cd "${build_dir}"/llvm-project/
git checkout "${llvm_release}"
mkdir -p build
save_cd build
safe_cd build
cmake -G "Ninja" -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;libcxx;libcxxabi;libunwind;lld;compiler-rt;debuginfo-tests' -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_CXX1Y=ON -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON -DBUILD_SHARED_LIBS=ON -DLLVM_BUILD_EXAMPLES=Off -DLLVM_INCLUDE_EXAMPLES=Off -DLLVM_BUILD_TESTS=Off -DLLVM_INCLUDE_TESTS=Off -DPYTHON_EXECUTABLE="$(which python3)" ../llvm
cmake --build .

Expand Down
2 changes: 1 addition & 1 deletion utils/installBuildEAR.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ echo "Getting the complete Build EAR source code"
tmp_dir="$(mktemp -d "Bear.XXXXXXXX" --tmpdir)"
git clone https://github.com/rizsotto/Bear.git "${tmp_dir}"
mkdir -p "${tmp_dir}"/build
save_cd "${tmp_dir}"/build
safe_cd "${tmp_dir}"/build
cmake ..
make install
make check
Expand Down
4 changes: 2 additions & 2 deletions utils/run-phasar-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ cp .clang-tidy-ignore external/json/.clang-tidy
cp .clang-tidy-ignore external/WALi-OpenNWA/.clang-tidy

echo "Run clang-tidy ..."
save_cd"${build_dir}" -
safe_cd"${build_dir}" -
run-clang-tidy.py -j "${num_jobs}" -p ./ -header-filter='phasar*.h' -fix
save_cd -
safe_cd -
echo "Run clang-format ..."
./utils/run-clang-format.py

Expand Down

0 comments on commit 16ee16c

Please sign in to comment.