mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-29 19:37:06 -05:00
Remove curl fallback from packaging scripts and require local tarball
This commit is contained in:
parent
8630da5ade
commit
950d4a0b10
4 changed files with 14 additions and 37 deletions
|
|
@ -4,8 +4,6 @@
|
|||
# using the @PACKAGE@.SlackBuild and related files in the current directory.
|
||||
#
|
||||
# This version:
|
||||
# - Prefers a source tarball already present in the current directory
|
||||
# - Only downloads it if not found locally
|
||||
# - Runs the SlackBuild (as root recommended for makepkg)
|
||||
#
|
||||
# Requirements:
|
||||
|
|
@ -15,7 +13,6 @@ set -euo pipefail
|
|||
|
||||
VERSION="@PACKAGE_VERSION@"
|
||||
TARBALL="@PACKAGE@-${VERSION}.tar.gz"
|
||||
SOURCE_URL="https://github.com/amadvance/@PACKAGE@/releases/download/v${VERSION}/${TARBALL}"
|
||||
|
||||
if [[ ! -f "pkg/@PACKAGE@.SlackBuild" ]]; then
|
||||
echo "Error: @PACKAGE@.SlackBuild not found in the current directory."
|
||||
|
|
@ -27,15 +24,13 @@ if [[ ! -f "pkg/slack-desc" ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Prefer local tarball
|
||||
if [[ -f "./${TARBALL}" ]]; then
|
||||
echo "Found ${TARBALL} locally."
|
||||
cp ${TARBALL} pkg/
|
||||
else
|
||||
echo "Downloading ${TARBALL}..."
|
||||
curl -L -O "$SOURCE_URL"
|
||||
if [[ ! -f "${TARBALL}" ]]; then
|
||||
echo "Error: ${TARBALL} not found in the current directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp ${TARBALL} pkg/
|
||||
|
||||
# Set environment variables for SlackBuild
|
||||
export VERSION BUILD=1 TAG=_am OUTPUT=$(pwd) # Package output in current dir
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue