From 8a9cb1e45c07008268084ba4d55e51bf6cfcdeee Mon Sep 17 00:00:00 2001 From: leafee98 Date: Fri, 4 Aug 2023 16:54:04 +0800 Subject: [PATCH] update README --- README.md | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 727c289..12947e2 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,42 @@ # Apt Repo Updater -This script will monitor a dir and execute `reprepro` to include the new .deb files. +This script will monitor an income dir and execute `reprepro` to +include the new .deb files under the income dir. # Usage +Create a directory as WORK_DIR, take `work` as example, and cd into it. + +```bash +mkdir work +cd work ``` -WORK_DIR=/srv/apt apt-repo-updater + +Create `conf/distributions` with content like the follow for `reprepro` +to use, see more at [here](https://manpages.debian.org/jessie/reprepro/reprepro.1.en.html) + +```bash +mkdir conf +cat << EOF > conf/distributions +Codename: bookworm +Description: An example repository +Architectures: amd64 +Components: main +EOF ``` + +Start apt-repo-updater + +```bash +/path/to/apt-repo-updater --work-dir . +``` + +Use another terminal to copy a .deb into the INCOME_DIR created +by apt-repo-updater, normally it will be named `income` under the WORK_DIR + +```bash +cp /path/to/a/package.deb /path/to/WORK_DIR/income +``` + +Now the apt repository will include the .deb file just copyied. +And the .deb file will be deleted after included in the repository.