From e11a87b2ec708caba03354d2b6db14747dd65035 Mon Sep 17 00:00:00 2001 From: Vladimir Diaz Date: Mon, 7 Jul 2014 19:24:11 -0400 Subject: [PATCH] Update client_setup_and_repository_example.md Add formatting and reorganize --- tuf/client_setup_and_repository_example.md | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/tuf/client_setup_and_repository_example.md b/tuf/client_setup_and_repository_example.md index 565bb10b..8e42a7a7 100644 --- a/tuf/client_setup_and_repository_example.md +++ b/tuf/client_setup_and_repository_example.md @@ -1,28 +1,29 @@ -# Client Setup and Repository Example # +## Client Setup and Repository Example ## The following function creates a directory structure that a client downloading new software using TUF (via tuf/client/updater.py) will expect. -The "root.json" metadata file must exist, and also the directories that hold the +The `root.json` metadata file must exist, and also the directories that hold the metadata files downloaded from a repository. Software updaters integrating with TUF may use this directory to store TUF updates saved on the client side. -create_tuf_client_directory() moves metadata from "path/to/repository/metadata" -to "path/to/client/". The repository in "path/to/repository/" is the repository -created in the "Create TUF Repository" section. ```python >>> from tuf.repository_tool import * >>> create_tuf_client_directory("path/to/repository/", "path/to/client/") ``` -# Test TUF Locally # -```Bash -# Run the local TUF repository server. -$ cd "path/to/repository/"; python -m SimpleHTTPServer 8001 +**create_tuf_client_directory()** moves metadata from `/path/to/repository/metadata` +to `/path/to/client/`. The repository in `/path/to/repository/` may be the repository +example created in the repository tool README. -# Retrieve targets from the TUF repository and save them to "path/to/client/". The -# "basic_client.py" module is available in "tuf/client/". + +## Test TUF Locally ## +Run the local TUF repository server. +```Bash +$ cd "path/to/repository/"; python -m SimpleHTTPServer 8001 ``` +Retrieve targets from the TUF repository and save them to "path/to/client/". The +`basic_client.py` module is available in `tuf/client/`. In a different command-line prompt . . . ```Bash $ cd "path/to/client/"