Skip to content

Commit 5a00f1d

Browse files
More uses of release archive gone
1 parent 7f2b3ee commit 5a00f1d

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

.evergreen/scripts/install-uninstall-check-windows.cmd

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ rem set PATH=C:\Windows\system32;C:\Windows
88
echo on
99
echo
1010

11+
set SRCROOT=%CD%
1112
set TAR=C:\cygwin\bin\tar
1213
set CMAKE=C:\cmake\bin\cmake
1314
set CMAKE_MAKE_PROGRAM=C:\mingw-w64\x86_64-4.9.1-posix-seh-rt_v3-rev1\mingw64\bin\mingw32-make.exe
@@ -30,10 +31,7 @@ mkdir %INSTALL_DIR%
3031
set PATH=%PATH%;%INSTALL_DIR%\bin
3132

3233
cd %BUILD_DIR%
33-
%TAR% xf ..\..\mongoc.tar.gz -C . --strip-components=1
34-
if errorlevel 1 (
35-
exit /B 1
36-
)
34+
robocopy "%SRCROOT%" "%BUILD_DIR%" /E /XD ".git" "%BUILD_DIR%" "_build" "cmake-build" /NP /NFL /NDL
3735

3836
if "%BSON_ONLY%"=="1" (
3937
set BSON_ONLY_OPTION=-DENABLE_MONGOC=OFF

.evergreen/scripts/install-uninstall-check.sh

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ DIR=$(dirname $0)
1010
. $DIR/find-cmake-latest.sh
1111
CMAKE=$(find_cmake_latest)
1212
. $DIR/check-symlink.sh
13+
SRCROOT=$(pwd)
1314

14-
if command -v gtar 2>/dev/null; then
15-
TAR=gtar
16-
else
17-
TAR=tar
18-
fi
15+
SCRATCH_DIR=$(pwd)/.scratch
16+
rm -rf "$SCRATCH_DIR"
17+
mkdir -p "$SCRATCH_DIR"
18+
cp -vr -- "$SRCROOT"/* "$SCRATCH_DIR"
1919

2020
if [ "$BSON_ONLY" ]; then
21-
BUILD_DIR=$(pwd)/build-dir-bson
22-
INSTALL_PREFIX=$(pwd)/install-dir-bson
21+
BUILD_DIR=$SCRATCH_DIR/build-dir-bson
22+
INSTALL_PREFIX=$SCRATCH_DIR/install-dir-bson
2323
else
24-
BUILD_DIR=$(pwd)/build-dir-mongoc
25-
INSTALL_PREFIX=$(pwd)/install-dir-mongoc
24+
BUILD_DIR=$SCRATCH_DIR/build-dir-mongoc
25+
INSTALL_PREFIX=$SCRATCH_DIR/install-dir-mongoc
2626
fi
2727

2828
if [ "$DESTDIR" ]; then
@@ -38,7 +38,8 @@ rm -rf $INSTALL_DIR
3838
mkdir -p $INSTALL_DIR
3939

4040
cd $BUILD_DIR
41-
$TAR xf ../../mongoc.tar.gz -C . --strip-components=1
41+
42+
cp -r -- "$SRCROOT"/* "$SCRATCH_DIR"
4243

4344
if [ "$BSON_ONLY" ]; then
4445
BSON_ONLY_OPTION="-DENABLE_MONGOC=OFF"
@@ -47,7 +48,7 @@ else
4748
fi
4849

4950

50-
$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DCMAKE_PREFIX_PATH=$INSTALL_DIR/lib/cmake $BSON_ONLY_OPTION .
51+
$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DCMAKE_PREFIX_PATH=$INSTALL_DIR/lib/cmake $BSON_ONLY_OPTION "$SCRATCH_DIR"
5152
$CMAKE --build .
5253
if [ "$DESTDIR" ]; then
5354
DESTDIR=$DESTDIR $CMAKE --build . --target install

0 commit comments

Comments
 (0)