diff --git a/Makefile b/Makefile index b1744f4..d879e81 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,11 @@ BIN_DIR := ./bin APP_NAME := backblaze-backup + +.PHONY: local_run +local_run: + go run ./cmd/main.go --dir "$(DIR)" --bucket "$(BUCKET)" + .PHONY: build_windows build_windows: @mkdir -p $(BIN_DIR) diff --git a/Readme.md b/Readme.md index 4322705..1583586 100644 --- a/Readme.md +++ b/Readme.md @@ -45,6 +45,14 @@ Or if you want to upload a single file: ./bin/backblaze-backup --bucket "your-bucket-name" --file "/path/to/file" ``` +You can also use the **`local_run`** command in the Makefile to run the application with a test directory and bucket: + +```bash +make local_run DIR="/home/user/test-upload" BUCKET="my-test-bucket" +``` + +This will run the application with the directory **/home/user/test-upload** and the bucket **my-test-bucket**. + ## Flags --bucket: The name of your Backblaze bucket