From c329f96a767c3cbbc5f3033d99cad699588d7626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lie=20DELHAIE?= Date: Wed, 6 Aug 2025 23:39:53 +0200 Subject: [PATCH] fix script, add readme.md --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ build.sh | 2 +- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..5857b8d --- /dev/null +++ b/README.md @@ -0,0 +1,56 @@ +# CloudSave + +The software is still in alpha. + +It is a small tool that simulates a backup in the “cloud” + +## Build + +You need go1.24 + +After downloading the go toolchain, just run the script `./build.sh` + +## Usage + +### Server + +The server needs an empty directory. After creating this directory, you need to make a file that contains your credential. The format is "username:password". The server only understand bcrypt password hash for now. + +e.g.: +``` +test:$2y$10$uULsuyROe3LVdTzFoBH7HO0zhvyKp6CX2FDNl7quXMFYqzitU0kc. +``` + +The default path to this directory is `/var/lib/cloudsave`, this can be changed with the `-config` argument + +### Client + +#### Register a game + +You can register a game with the verb `add` +```bash +cloudsave add /home/user/gamedata +``` + +You can also change the name of the registration and add a remote +```bash +cloudsave add -name "My Game" -remote "http://localhost:8080" /home/user/gamedata +``` + +#### Make an archive of the current state + +This is a command line tool, it cannot auto detect changes. +Run this command to start the scan, if needed, the tool will create a new archive + +```bash +cloudsave scan +``` +#### Send everythings on the server + +This will pull and push data to the server. + +Note: If multiple computers are pushing to this server, a conflict may be generated. If so, the tool will ask for the version to keep + +```bash +cloudsave sync +``` diff --git a/build.sh b/build.sh index 571f5ba..8f9dc5b 100755 --- a/build.sh +++ b/build.sh @@ -70,7 +70,7 @@ for platform in "${platforms[@]}"; do if [ "$MAKE_PACKAGE" == "true" ]; then CGO_ENABLED=0 GOOS=${platform_split[0]} GOARCH=${platform_split[1]} go build -o build/cloudsave_web$EXT -a ./cmd/web - tar -czf build/server_${platform_split[0]}_${platform_split[1]}.tar.gz build/cloudsave_web$EXT + tar -czf build/web_${platform_split[0]}_${platform_split[1]}.tar.gz build/cloudsave_web$EXT rm build/cloudsave_web$EXT else CGO_ENABLED=0 GOOS=${platform_split[0]} GOARCH=${platform_split[1]} go build -o build/cloudsave_web_${platform_split[0]}_${platform_split[1]}$EXT -a ./cmd/web