Skip to content

Sync vuescan MD5SUM values. #53

Sync vuescan MD5SUM values.

Sync vuescan MD5SUM values. #53

Workflow file for this run

---
name: Sync vuescan MD5SUM values.
"on":
workflow_dispatch:
schedule:
# run once everyday at 10:00 JST
- cron: '0 1 * * *'
jobs:
vuescan:
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
show-progress: false
- name: Update the md5sum of graphics/vuescan.
run: |
(
cd graphics/vuescan/
. vuescan.info
# shellcheck disable=SC2086
wget --content-disposition $DOWNLOAD $DOWNLOAD_x86_64
MD5SUM="$(md5sum vue*32*tgz | cut -f1 -d' ' | sed '$ s/^/ /')"
MD5SUM_x86_64="$(md5sum vue*64*tgz | cut -f1 -d' ' | sed '$ s/^/ /')"
VERSION="$(find ./*.tgz | cut -d- -f2 | xargs -I xx basename -s .tgz xx | sort -u)"
rm -- *tgz*
sed -i "s/^VERSION.*/VERSION=\${VERSION:-$VERSION}/" vuescan.SlackBuild
sed -i "s/^VERSION.*/VERSION=\"$VERSION\"/" vuescan.info
perl -0777 -i -pe "s/(MD5SUM=)\".*(DOWNLOAD_x86_64)/\1\"$MD5SUM\"\n\2/gs" vuescan.info
sed -i '/MD5SUM=/s/$/ \\/' vuescan.info
perl -0777 -i -pe "s/(MD5SUM_x86_64=)\".*(REQUIRES)/\1\"$MD5SUM_x86_64\"\n\2/gs" vuescan.info
sed -i '/MD5SUM_x86_64=/s/$/ \\/' vuescan.info
)
if [[ $(git status --porcelain) ]]; then
BUILD="$(grep ^BUILD= graphics/vuescan/vuescan.SlackBuild | cut -d= -f2 | cut -d- -f2 | sed 's/}$//')"
BUILD=$((BUILD + 1))
sed -i "s/^BUILD.*/BUILD=\${BUILD:-$BUILD}/" graphics/vuescan/vuescan.SlackBuild
fi
- name: Push back updated md5sum.
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
with:
commit_message: 'graphics/vuescan: Updated MD5SUMs.'