diff --git a/Makefile b/Makefile index 07b7be8..d7daf8b 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ -BIN := $(HOME)/.local/bin -DIST := $(CURDIR)/dist -NAME := thu-learn-downloader +BIN := $(HOME)/.local/bin +DIST := $(CURDIR)/dist +NAME := thu-learn-downloader -OS != echo $(RUNNER_OS) | tr '[:upper:]' '[:lower:]' -ARCH != echo $(RUNNER_ARCH) | tr '[:upper:]' '[:lower:]' +OS := $(shell echo $(RUNNER_OS) | tr '[:upper:]' '[:lower:]') +ARCH := $(shell echo $(RUNNER_ARCH) | tr '[:upper:]' '[:lower:]') ifeq ($(OS), windows) EXE := .exe else diff --git a/README.md b/README.md index b5ab7ac..44bc839 100644 --- a/README.md +++ b/README.md @@ -33,15 +33,7 @@ ## Usage -### Pre-built Binary +Download pre-built binary from [releases](https://github.com/liblaf/thu-learn-downloader/releases) or install from PyPI by executing `pip install thu-learn-downloader`. -1. Download pre-built binary from [releases](https://github.com/liblaf/thu-learn-downloader/releases). -2. Prepare a `config.yaml` like [config.yaml](https://github.com/liblaf/thu-learn-downloader/blob/main/config.yaml). -3. Run `thu-learn-downloader password="***"` and wait for the sync to finish. - -### pip - -```shell -pip install thu-learn-downloader -python -m thu_learn_downloader username="***" password="***" -``` +1. Prepare a `config.yaml` like [config.yaml](https://github.com/liblaf/thu-learn-downloader/blob/main/config.yaml). +2. Run `thu-learn-downloader password="***"` and wait for the sync to finish.