vcpkg.cmd 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/install.cmd +30 -3
  2. package/package.json +4 -4
package/install.cmd CHANGED
@@ -1,9 +1,36 @@
1
1
  @echo off
2
2
  @setlocal enabledelayedexpansion
3
+ set "REPO=https://github.com/Microsoft/vcpkg"
4
+ set "TEMP_DIR=temp"
5
+
6
+
3
7
  :: We want to download vcpkg in the current directory
4
- set "repo=repo"
5
- git clone https://github.com/Microsoft/vcpkg %repo% --depth 1
6
- robocopy "%repo%" . /e /move /nfl /ndl /njh /njs /np /nc /ns /xd "%repo%\.git"
8
+ :: 1. Download the repo to a temp folder
9
+ git --version >nul 2>&1
10
+ if "%errorlevel%" neq "0" (
11
+ echo Git is not installed. Please install Git and ensure it is in your PATH.
12
+ exit /b 1
13
+ )
14
+ git clone --depth 1 "%REPO%" "%TEMP_DIR%"
15
+ del /f "vcpkg.exe" >nul 2>&1
16
+ :: 2. Move the contents of the temp folder to the current directory
17
+ robocopy /? >nul 2>&1
18
+ if "%errorlevel%"=="0" (
19
+ robocopy "%TEMP_DIR%" . /e /move /nfl /ndl /njh /njs /np /nc /ns /xd "%TEMP_DIR%\.git"
20
+ )
21
+ else (
22
+ for /d %%D in ("%TEMP_DIR%\*") do (
23
+ if /i not "%%~nxD"==".git" move "%%D" .
24
+ )
25
+ for %%F in ("%TEMP_DIR%\*") do (
26
+ if /i not "%%~nxF"==".git" move "%%F" .
27
+ )
28
+ )
29
+ if exist "%TEMP_DIR%\" (
30
+ rmdir /i /q "%TEMP_DIR%"
31
+ )
32
+
33
+
7
34
  :: Now, lets install vcpkg
8
35
  bootstrap-vcpkg -disableMetrics
9
36
  vcpkg integrate install
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vcpkg.cmd",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "C++ Library Manager for Windows, Linux, and MacOS; Microsoft (2016).",
5
5
  "main": "vcpkg.exe",
6
6
  "bin": {
@@ -26,10 +26,10 @@
26
26
  "author": "wolfram77@gmail.com",
27
27
  "repository": {
28
28
  "type": "git",
29
- "url": "git+https://github.com/nodef/vcpkg.cmd.git"
29
+ "url": "git+https://github.com/nodef/vcpkg.sh.git"
30
30
  },
31
- "homepage": "https://github.com/nodef/vcpkg.cmd#readme",
31
+ "homepage": "https://github.com/nodef/vcpkg.sh#readme",
32
32
  "bugs": {
33
- "url": "https://github.com/nodef/vcpkg.cmd/issues"
33
+ "url": "https://github.com/nodef/vcpkg.sh/issues"
34
34
  }
35
35
  }