aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Lowry <bobertlo@gmail.com>2018-12-10 22:42:29 +0000
committerMichael Aldridge <aldridge.mac@gmail.com>2018-12-12 04:48:41 +0000
commit4925836a185fc7d2f016b7ef22bcc48efb3ca4de (patch)
tree8007c7063c46064e053bcac47573d09ffe68cc6f
parentda37d21d84448cf6deecc944d59ac2876e74aeda (diff)
downloadxbps-mini-builder-4925836a185fc7d2f016b7ef22bcc48efb3ca4de.tar
xbps-mini-builder-4925836a185fc7d2f016b7ef22bcc48efb3ca4de.tar.gz
xbps-mini-builder-4925836a185fc7d2f016b7ef22bcc48efb3ca4de.tar.bz2
xbps-mini-builder-4925836a185fc7d2f016b7ef22bcc48efb3ca4de.tar.lz
xbps-mini-builder-4925836a185fc7d2f016b7ef22bcc48efb3ca4de.tar.xz
xbps-mini-builder-4925836a185fc7d2f016b7ef22bcc48efb3ca4de.tar.zst
xbps-mini-builder-4925836a185fc7d2f016b7ef22bcc48efb3ca4de.zip
update README and script to be slightly more user friendly.HEADmaster
-rw-r--r--README.md29
-rwxr-xr-xxbps-mini-builder16
2 files changed, 34 insertions, 11 deletions
diff --git a/README.md b/README.md
index c321b32..ea86d33 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,27 @@
# xbps-mini-builder
This is the XBPS mini builder, use it when you want to create a mirror
-containing restricted packages that the Void project doesn't build for
-you. Put this script in a directory on its own and put a
-`packages.list` next to it that contians the packages you want to
-build. You can also add an `xbps-src.conf` to be used during builds.
+containing restricted packages that the Void project doesn't build for you. Put
+this script in a directory on its own and put a `packages.list` next to it that
+contains the packages you want to build. You can also add an `xbps-src.conf` to
+be used during builds.
-Run the script on a cron or with `snooze(1)` once a day to get
-updates, all other tasks are handled for you!
+Run the script on a cron or with `snooze(1)` once a day to get updates, all
+other tasks are handled for you!
+
+## Notes
+
+- Create `packages.list` and `xbps-src.conf` before running `xbps-mini-builder`
+- Run the script *only* as the user you plan to run it as normally, or the
+ repository will have broken permissions.
+- To build restricted packages, you must add `XBPS_ALLOW_RESTRICTED=yes` to
+ `xbps-src.conf`
+
+## Troubleshooting
+
+If you do add packages to `packages.list` after the script has initialized the
+repository, or forgot to enable the building of restricted packages, the script
+will not build the package files until they are updated upstream. To manually
+build a specific package, run `./xbps-mini-builder <package>` and it will build
+the package, whether it has changed or not. Remember to only run this as the
+user that will be running the script normally.
diff --git a/xbps-mini-builder b/xbps-mini-builder
index 2fdf4b8..72cd850 100755
--- a/xbps-mini-builder
+++ b/xbps-mini-builder
@@ -58,11 +58,17 @@ if [ -f ../xbps-src.conf ] ; then
cat ../xbps-src.conf >> etc/conf
fi
-while read -r package ; do
- if grep "${package}" ../changed; then
- ./xbps-src pkg "${package}"
- fi
-done < ../packages.list
+if [ -z "$@" ] ; then
+ while read -r package ; do
+ if grep "${package}" ../changed; then
+ ./xbps-src pkg "${package}"
+ fi
+ done < ../packages.list
+else
+ for pkg in "$@"; do
+ ./xbps-src pkg "${pkg}"
+ done
+fi
# Sign built packages
xbps-rindex --sign --signedby "XBPS-mini-builder" --privkey ../id_rsa hostdir/binpkgs