diff options
author | Slack Coder <slackcoder@server.ky> | 2024-04-04 15:39:53 -0500 |
---|---|---|
committer | Slack Coder <slackcoder@server.ky> | 2024-04-04 15:39:53 -0500 |
commit | 78ae23521d975aa1714b689d572d6119b9cd7558 (patch) | |
tree | 97897a679c412be9e23eaec503d135cca9b236ca /README.md | |
parent | 0148030e54255ee136bd5fdfce4b65a5eea57b08 (diff) | |
download | slack-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.md | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -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. |