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

View file

@ -1,7 +1,14 @@
#!/bin/sh #!/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 curl "$script">update-integrity
echo "Installing..."
chmod +x update-update-integrity chmod +x update-update-integrity
sudo cp -f update-integrity /usr/bin/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 # Automatically replaces sha256sums* with updated versions from
# makepkg -g. Previous PKGBUILD is always backed up. # makepkg -g. Previous PKGBUILD is always backed up.
# Requires kakoune (pacman -S kakoune) # Requires kakoune (pacman -S kakoune)
# Author: Daniel Fichtinger <daniel@ficd.ca> # Author: Daniel Fichtinger <daniel@ficd.sh>
# License: GPLv3 # License: GPLv3
# check if user gave path to a PKGBUILD, # check if user gave path to a PKGBUILD,