aboutsummaryrefslogtreecommitdiffstats
path: root/gitea-cli
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-07-06 11:55:07 +0200
committerDanilo M. <danix@danix.xyz>2026-07-06 11:55:07 +0200
commita71f1934f9b8f28372228c26310b55b2369e1aee (patch)
tree9fa86ba9642e0f4264f7829ad9cf98e183c30986 /gitea-cli
parente47e048651d230adb0812a2388ad5d01914ad8b2 (diff)
downloadmy-slackbuilds-a71f1934f9b8f28372228c26310b55b2369e1aee.tar.gz
my-slackbuilds-a71f1934f9b8f28372228c26310b55b2369e1aee.zip
gitea-cli: use idiomatic || fallback for source tarball name
Match the pattern other gitea-sourced SBo packages use: try the URL path basename first, fall back to the Content-Disposition name. Fixes the stable batch-test env (plain wget) while keeping slackrepo working. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'gitea-cli')
-rw-r--r--gitea-cli/gitea-cli.SlackBuild11
1 files changed, 6 insertions, 5 deletions
diff --git a/gitea-cli/gitea-cli.SlackBuild b/gitea-cli/gitea-cli.SlackBuild
index 9266402..27edc48 100644
--- a/gitea-cli/gitea-cli.SlackBuild
+++ b/gitea-cli/gitea-cli.SlackBuild
@@ -65,12 +65,13 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-# gitea serves the archive via Content-Disposition as "$SRCNAM-v$VERSION.tar.gz"
-# (tea-v$VERSION.tar.gz), and that is the name slackrepo/sbodl save it under,
-# NOT the URL path basename. It extracts to a top dir named "$SRCNAM" (tea),
-# not "$SRCNAM-$VERSION".
+# The gitea archive lands under one of two names depending on the downloader:
+# "v$VERSION.tar.gz" (URL path basename, e.g. plain wget) or
+# "$SRCNAM-v$VERSION.tar.gz" (Content-Disposition, e.g. slackrepo/sbodl).
+# Accept either, the way other gitea-sourced SBo packages do. It extracts to a
+# top dir named "$SRCNAM" (tea), not "$SRCNAM-$VERSION".
rm -rf $SRCNAM
-tar xvf $CWD/$SRCNAM-v$VERSION.tar.gz
+tar xvf $CWD/v$VERSION.tar.gz || tar xvf $CWD/$SRCNAM-v$VERSION.tar.gz
cd $SRCNAM
chown -R root:root .