mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 06:53:47 -07:00
Initial release
This commit is contained in:
40
tests/update_catch2.sh
Executable file
40
tests/update_catch2.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
# update_catch2.sh [refspec]
|
||||
|
||||
# `./update_catch2 $(cat catch2/COMMIT)` should be a no-op
|
||||
|
||||
# Yes, this is kinda reinventing submodule or subtree or FetchContent
|
||||
# But AFAICT FetchContent is not otherwise used in this repo
|
||||
# submodules are annoying
|
||||
# subtree is overkill
|
||||
# So here you go, if you want to use it.
|
||||
|
||||
set -ex
|
||||
|
||||
SCRIPTDIR="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
|
||||
|
||||
TDIR="$(mktemp -d)"
|
||||
trap 'rm -fR "${TDIR}"' EXIT
|
||||
cd "${TDIR}"
|
||||
git init -b dontcare
|
||||
git fetch --depth=1 https://github.com/catchorg/Catch2.git "$1"
|
||||
git checkout FETCH_HEAD
|
||||
COMMIT="$(git rev-parse HEAD)"
|
||||
|
||||
cd "$SCRIPTDIR"
|
||||
git rm -f -r --quiet -- catch2
|
||||
rm -fR catch2 || true
|
||||
mkdir catch2
|
||||
mv "${TDIR}/"CMake* catch2
|
||||
sed -i 's#set_property(GLOBAL PROPERTY USE_FOLDERS ON)##g' catch2/CMakeLists.txt
|
||||
mv "${TDIR}/src" catch2
|
||||
mv "${TDIR}/extras" catch2
|
||||
mv "${TDIR}/LICENSE.txt" catch2
|
||||
echo "${COMMIT}" > catch2/COMMIT
|
||||
git add catch2
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user