aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-10-20 18:06:26 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2016-10-20 18:06:26 -0700
commite118c157198ee4218492cafb7ef3aaa1e3442c78 (patch)
treebae13023c2964c4e5d8c305ddb0b161271b4380a
parentc12c3d90bee810abaec479c49d889957b52151db (diff)
downloadvcpkg-e118c157198ee4218492cafb7ef3aaa1e3442c78.tar.gz
vcpkg-e118c157198ee4218492cafb7ef3aaa1e3442c78.zip
Remove accidental copy of file
-rw-r--r--toolsrc/vcpkg/commands_hash.cpp40
1 files changed, 0 insertions, 40 deletions
diff --git a/toolsrc/vcpkg/commands_hash.cpp b/toolsrc/vcpkg/commands_hash.cpp
deleted file mode 100644
index e4e0e1747..000000000
--- a/toolsrc/vcpkg/commands_hash.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#include "vcpkg_Commands.h"
-#include "vcpkg_System.h"
-#include "vcpkg.h"
-#include <iostream>
-#include <iomanip>
-#include <Windows.h>
-
-namespace fs = std::tr2::sys;
-
-namespace vcpkg
-{
- void file_hash_sha512(fs::path const & path, char const * hash)
- {
- auto cmd_line = Strings::format("Powershell -Command (Get-FileHash %s -Algorithm %s).Hash.ToLower()",
- Strings::utf16_to_utf8(path.c_str()),
- hash);
- auto ec_data = System::cmd_execute_and_capture_output(Strings::utf8_to_utf16(cmd_line));
- Checks::check_exit(ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line);
- System::print(ec_data.output.c_str());
- }
-
- void hash_command(const vcpkg_cmd_arguments& args)
- {
- static const std::string example = Strings::format(
- "The argument should be a file path\n%s", create_example_string("hash boost_1_62_0.tar.bz2 "));
- args.check_min_arg_count(1, example.c_str());
- args.check_max_arg_count(2, example.c_str());
-
- if (args.command_arguments.size() == 1)
- {
- file_hash_sha512(args.command_arguments[0], "SHA512");
- }
- if (args.command_arguments.size() == 2)
- {
- file_hash_sha512(args.command_arguments[0], args.command_arguments[1].c_str());
- }
-
- exit(EXIT_SUCCESS);
- }
-}