updated installer, readme, repo url

This commit is contained in:
Daniel Fichtinger 2025-07-16 16:57:09 -04:00
parent 0a2130c801
commit 4151a8be91
3 changed files with 30 additions and 20 deletions

View file

@ -1,25 +1,28 @@
# PKGBUILD Update Integrity
This repository contains a simple helper script, `update-integrity`. Its
purpose is to easily update the `sha256` sums in PKGBUILD files. This is
helpful if you're maintaining a PKGBUILD and have bumped a version or
updated some sources. It simply replaces the existing hashes with the
output of `makepkg -g`, first prompting the user for a review and
confirmation. It requires `kakoune` since we use `kak -f` to perform the
replacement.
This repository contains a simple helper script, `update-integrity`. Its purpose
is to easily update the `sha256` sums in PKGBUILD files. This is helpful if
you're maintaining a PKGBUILD and have bumped a version or updated some sources.
It simply replaces the existing hashes with the output of `makepkg -g`, first
prompting the user for a review and confirmation. It requires `kakoune` since we
use `kak -f` to perform the replacement.
To use the script, simply provide a path to a `PKGBUILD` or its parent
directory as the argument. If no argument is given, the current working
directory is used.
To use the script, simply provide a path to a `PKGBUILD` or its parent directory
as the argument. If no argument is given, the current working directory is used.
The following installation script is provided as a convenience. You can
copy this code into a POSIX shell to install `update-integrity`.
An installation script is provided as a convenience.
> [!IMPORTANT]
> You should **never** pipe an unknown script directly into your shell.
> **Always** review it first.
```sh
#!/bin/sh
script="https://git.sr.ht/~ficd/pkgbuild-update-integrity/blob/main/update-integrity"
curl "$script">update-integrity
chmod +x update-update-integrity
sudo cp -f update-integrity /usr/bin/update-integrity
url="https://git.ficd.sh/ficd/pkgbuild-update-integrity/raw/branch/main/install.sh"
# download installer
curl "$url" -o /tmp/install.sh
# review it
less /tmp/install.sh
# make it executable, run it
chmod +x /tmp/install.sh
/tmp/install.sh
```

View file

@ -1,7 +1,14 @@
#!/bin/sh
script="https://git.sr.ht/~ficd/pkgbuild-update-integrity/blob/main/update-integrity"
temp="$(mktemp -d)"
script="https://git.ficd.sh/ficd/pkgbuild-update-integrity/raw/branch/main/update-integrity.sh"
cd "$temp" || echo 'Error creating temp dir!' && exit 1
echo "Downloading script..."
curl "$script">update-integrity
echo "Installing..."
chmod +x update-update-integrity
sudo cp -f update-integrity /usr/bin/update-integrity
echo "Cleaning up..."
rm -r "$temp"
echo "Done!"

View file

@ -5,7 +5,7 @@
# Automatically replaces sha256sums* with updated versions from
# makepkg -g. Previous PKGBUILD is always backed up.
# Requires kakoune (pacman -S kakoune)
# Author: Daniel Fichtinger <daniel@ficd.ca>
# Author: Daniel Fichtinger <daniel@ficd.sh>
# License: GPLv3
# check if user gave path to a PKGBUILD,