aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md91
1 files changed, 91 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..5d04899
--- /dev/null
+++ b/README.md
@@ -0,0 +1,91 @@
+# mkhintfile.sh
+
+Manage hint files for slackrepo scripts. Updates version strings and download checksums, or creates new hint files from repository .info files.
+
+## Installation
+
+### Script
+
+```bash
+sudo cp mkhintfile.sh /usr/local/bin/mkhintfile
+```
+
+### Bash Completion
+
+```bash
+sudo cp mkhintfile.bash-completion /etc/bash-completion.d/mkhintfile
+```
+
+### Configuration
+
+Edit the paths at the top of mkhintfile.sh to match your setup:
+
+```bash
+REPO_DIR="/var/lib/sbopkg/SBo-danix" # Repository containing .info files
+HINT_DIR="/tmp/hintdir" # Directory where .hint files are stored
+```
+
+## Usage
+
+### Update an existing hint file
+
+Updates the package version, downloads the archive, and recalculates the MD5 checksums:
+
+```bash
+mkhintfile --version 2.0.1 --hintfile mypackage
+```
+
+This replaces the old version with 2.0.1 in mypackage.hint and re-downloads the URLs from DOWNLOAD and DOWNLOAD_x86_64 to update MD5SUM and MD5SUM_x86_64.
+
+### Create a new hint file from .info
+
+Generates a new hint file from the corresponding repository .info file:
+
+```bash
+mkhintfile --version 1.2.3 --new mypackage
+```
+
+The .info file is copied as a template, unwanted variables (PRGNAM, HOMEPAGE, MAINTAINER, EMAIL) are removed, and ARCH is set to x86_64.
+
+### Create an empty hint file
+
+Creates a fresh hint file with empty variables:
+
+```bash
+mkhintfile --new mypackage
+```
+
+### List hint files
+
+```bash
+mkhintfile --list
+```
+
+### Help
+
+```bash
+mkhintfile --help
+```
+
+## Exit Codes
+
+- 0 - Success
+- 1 - Invalid arguments
+- 2 - File not found
+- 3 - File already exists
+- 4 - wget not available
+
+## Hint File Variables
+
+- VERSION - Package version
+- ARCH - Architecture
+- DOWNLOAD - Download URL (generic/32-bit)
+- MD5SUM - MD5 checksum of the generic archive
+- DOWNLOAD_x86_64 - Download URL (x86_64 specific)
+- MD5SUM_x86_64 - MD5 checksum of the x86_64 archive
+
+## Notes
+
+- Old versions of hint files are backed up with a .bak extension before being modified.
+- If a download URL is set to UNSUPPORTED or UNTESTED, the link is skipped during update.
+- Bash completion for -f/--hintfile and -n/--new autocompletes package names from their respective directories.