From c0f5f74a4ab3a67617c42541fdfdb6489daf203a Mon Sep 17 00:00:00 2001 From: John Doe Date: Tue, 21 Mar 2023 17:23:23 -0400 Subject: [PATCH] Add README --- README.md | 5 +++++ ftu.c | 2 +- set_token_path.sh | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..879875e --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# FTU - the FemtoStar Token Utility + +FTU is a command line frontend for fstoken, FemtoStar's implementation of its Credit Token system, allowing users to manually generate, sign, handle, and validate Credit Tokens for use with the FemtoStar Protocol. It is, at present, developed and tested only on GNU/Linux. + +FTU can be used with arbitrary targets, including user-generated ones, and at present it does not include any. To use it, you will need a directory at your token path containing a directory named `targets`. Set the environment variable FEMTOSTAR_TOKEN_PATH to the path you want to store your targets at. For testing without modifying your environment, you can run `source set_token_path.sh` to set the token path, by default to `~/fstokens` in your home directory, and, if needed, create these directories. \ No newline at end of file diff --git a/ftu.c b/ftu.c index 68569b9..658eb9d 100644 --- a/ftu.c +++ b/ftu.c @@ -492,7 +492,7 @@ int list_targets(bool verbose){ #endif if(n == -1){ - fprintf(stderr, "Could not list directory at token path.\n"); + fprintf(stderr, "Could not list targets directory in token path. Does it exist?\n"); exit(1); } diff --git a/set_token_path.sh b/set_token_path.sh index 1738612..196c0b6 100755 --- a/set_token_path.sh +++ b/set_token_path.sh @@ -1,3 +1,6 @@ #!/bin/bash # source this file to set your token path, or add this to your profile -export FEMTOSTAR_TOKEN_PATH=~/fstokens \ No newline at end of file +export FEMTOSTAR_TOKEN_PATH=~/fstokens + +mkdir -p $FEMTOSTAR_TOKEN_PATH +mkdir -p $FEMTOSTAR_TOKEN_PATH/targets \ No newline at end of file