aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2024-04-04 15:39:53 -0500
committerSlack Coder <slackcoder@server.ky>2024-04-04 15:39:53 -0500
commit78ae23521d975aa1714b689d572d6119b9cd7558 (patch)
tree97897a679c412be9e23eaec503d135cca9b236ca /README.md
parent0148030e54255ee136bd5fdfce4b65a5eea57b08 (diff)
downloadslack-autoupdate-78ae23521d975aa1714b689d572d6119b9cd7558.tar.xz
Help users download from custom sources
Describe in the README how to support downloading from a custom source, and add a source code location for examples.
Diffstat (limited to 'README.md')
-rw-r--r--README.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/README.md b/README.md
index f626dd1..a0aebad 100644
--- a/README.md
+++ b/README.md
@@ -105,6 +105,32 @@ chmod +x /usr/local/sbin/install-kernel
## Source
+### Customizing Update Downloads
+
+You can add a section to the [script](src/slack-autoupdate) to pull updates
+using different tools or sources. The sections use the following structure,
+and some examples are provided in the [recipes](src/recipes) directory.
+
+```
+if ! OUTPUT="$(
+ # Redirect error output to standard output.
+ exec 2>&1
+
+ # Download updates into $STAGING_DIR.
+ #
+ # On failure the command output is appended to the error file.
+ # Update information should be appended to the $UPDATE_INFO file.
+
+)"; then
+ if [ -f "$UPDATE_ERROR" ]; then
+ >>"$UPDATE_ERROR" echo ""
+ >>"$UPDATE_ERROR" echo ""
+ fi
+
+ >>"$UPDATE_ERROR" echo -e "[Update Name]:\n\n$OUTPUT"
+fi
+```
+
### Testing
You can test the project by running the shell files under the 'test' folder.