diff options
author | adlr@google.com <adlr@google.com@06c00378-0e64-4dae-be16-12b19f9950a1> | 2009-12-04 20:57:17 +0000 |
---|---|---|
committer | adlr@google.com <adlr@google.com@06c00378-0e64-4dae-be16-12b19f9950a1> | 2009-12-04 20:57:17 +0000 |
commit | 3defe6acb3609e70e851a6eff062577d25a2af9d (patch) | |
tree | 341e979027fde117dd8906483db7a5c703a2e1cf /generate_delta_main.cc | |
parent | c98a7edf648aad88b3f66df3b5a7d43d6a6d7fa9 (diff) |
Missed new files in last commit
Review URL: http://codereview.chromium.org/465067
git-svn-id: svn://chrome-svn/chromeos/trunk@336 06c00378-0e64-4dae-be16-12b19f9950a1
Diffstat (limited to 'generate_delta_main.cc')
-rw-r--r-- | generate_delta_main.cc | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/generate_delta_main.cc b/generate_delta_main.cc new file mode 100644 index 00000000..14af193a --- /dev/null +++ b/generate_delta_main.cc @@ -0,0 +1,48 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include <sys/types.h> +#include <sys/stat.h> +#include <dirent.h> +#include <fcntl.h> +#include <stdlib.h> +#include <stdio.h> +#include <unistd.h> + +#include <algorithm> +#include <string> +#include <vector> +#include <tr1/memory> + +#include <glib.h> + +#include "chromeos/obsolete_logging.h" +#include "update_engine/subprocess.h" +#include "update_engine/update_metadata.pb.h" + +using std::sort; +using std::string; +using std::vector; +using std::tr1::shared_ptr; + +// This file contains a simple program that takes an old path, a new path, +// and an output file as arguments and the path to an output file and +// generates a delta that can be sent to Chrome OS clients. + +namespace chromeos_update_engine { + +int main(int argc, char** argv) { + g_thread_init(NULL); + Subprocess::Init(); + if (argc != 4) { + usage(argv[0]); + } + const char* old_dir = argv[1]; + const char* new_dir = argv[2]; + if ((!IsDir(old_dir)) || (!IsDir(new_dir))) { + usage(argv[0]); + } + // TODO(adlr): implement using DeltaDiffGenerator + return 0; +}
\ No newline at end of file |