Sync with 0.6.9 template.
This commit is contained in:
parent
cfcb903fa0
commit
63fbbab332
1 changed files with 12 additions and 12 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Version: 0.6.6
|
# Version: 0.6.9
|
||||||
# Copyright (c) 2005-2022:
|
# Copyright (c) 2005-2022:
|
||||||
# Darren 'Tadgy' Austin <darren (at) afterdark.org.uk>
|
# Darren 'Tadgy' Austin <darren (at) afterdark.org.uk>
|
||||||
# Licensed under the terms of the GNU General Public License version 3.
|
# Licensed under the terms of the GNU General Public License version 3.
|
||||||
|
|
@ -12,6 +12,9 @@
|
||||||
# Silence shellcheck.
|
# Silence shellcheck.
|
||||||
# shellcheck disable=SC2015,SC2174
|
# shellcheck disable=SC2015,SC2174
|
||||||
|
|
||||||
|
# extglob is required.
|
||||||
|
shopt -s extglob
|
||||||
|
|
||||||
# Functions.
|
# Functions.
|
||||||
check_installed() {
|
check_installed() {
|
||||||
# $1 = The package name to check is installed.
|
# $1 = The package name to check is installed.
|
||||||
|
|
@ -161,12 +164,12 @@ rm -rf "$BUILD_ROOT" && mkdir -m 755 "$BUILD_ROOT" || die "Failed to clear build
|
||||||
WGET="$(command -v wget)"
|
WGET="$(command -v wget)"
|
||||||
I=0
|
I=0
|
||||||
while read -r SRC; do
|
while read -r SRC; do
|
||||||
[[ ! -e "${SRC_FILENAMES[$I]}" ]] && {
|
[[ ! -e "${SRC_FILENAMES[I]}" ]] && {
|
||||||
[[ -z "$WGET" ]] && die "wget is required to download sources"
|
[[ -z "$WGET" ]] && die "wget is required to download sources"
|
||||||
"$WGET" -t 3 -c -T 30 -w 5 --retry-connrefused --retry-on-host-error --no-check-certificate --passive-ftp -O "${SRC_FILENAMES[$I]}" "$SRC" || \
|
"$WGET" -t 3 -c -T 30 -w 5 --retry-connrefused --retry-on-host-error --no-check-certificate --passive-ftp -O "${SRC_FILENAMES[I]}" "$SRC" || \
|
||||||
{ rm "${SRC_FILENAMES[$I]}"; die "Failed to download source file: $SRC"; }
|
{ rm "${SRC_FILENAMES[I]}"; die "Failed to download source file: $SRC"; }
|
||||||
}
|
}
|
||||||
[[ "$(md5sum "${SRC_FILENAMES[$I]}" | cut -d' ' -f1)" != "${SRC_MD5SUMS[$I]}" ]] && die "md5sum verification failed: ${SRC_FILENAMES[$I]}"
|
[[ "$(md5sum "${SRC_FILENAMES[I]}" | cut -d' ' -f1)" != "${SRC_MD5SUMS[I]}" ]] && die "md5sum verification failed: ${SRC_FILENAMES[I]}"
|
||||||
(( I++ ))
|
(( I++ ))
|
||||||
done < <(printf "%s\\n" "${SRC_DOWNLOADS[@]}")
|
done < <(printf "%s\\n" "${SRC_DOWNLOADS[@]}")
|
||||||
}
|
}
|
||||||
|
|
@ -225,23 +228,20 @@ sed -r -e "s:%CC%:${BUILD_ALTCC:+CC=\"$BUILD_ALTCC\"}:g" -e "s:%CXX%:${BUILD_ALT
|
||||||
|
|
||||||
# Process each of the sources.
|
# Process each of the sources.
|
||||||
for ((I = 0; I < ${#BUILD_PERL_MODULES[@]}; I++)); do
|
for ((I = 0; I < ${#BUILD_PERL_MODULES[@]}; I++)); do
|
||||||
# Be in the source directory.
|
|
||||||
cd "$BUILD_WORKDIR/${SRC_DIRNAMES[$I]}" || die "Failed to change to source directory: $BUILD_WORKDIR/${SRC_DIRNAMES[$I]}"
|
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
# Begin section that will require editing. #
|
# Begin section that will require editing. #
|
||||||
############################################
|
############################################
|
||||||
|
|
||||||
# Build each module.
|
# Build each module.
|
||||||
if perl -M"${BUILD_PERL_MODULES[$I]}" -e0 >/dev/null 2>&1; then
|
if perl -M"${BUILD_PERL_MODULES[I]}" -e0 >/dev/null 2>&1; then
|
||||||
printf "\\n\\033[1;32;40m%s\\n" "********************************************************************************"
|
printf "\\n\\033[1;32;40m%s\\n" "********************************************************************************"
|
||||||
printf "* %s: %s\\n" "Already Installed" "${BUILD_PERL_MODULES[$I]}"
|
printf "* %s: %s\\n" "Already Installed" "${BUILD_PERL_MODULES[I]}"
|
||||||
printf "%s\\033[0;39m\\n" "********************************************************************************"
|
printf "%s\\033[0;39m\\n" "********************************************************************************"
|
||||||
else
|
else
|
||||||
printf "\\n\\033[1;33;40m%s\\n" "********************************************************************************"
|
printf "\\n\\033[1;33;40m%s\\n" "********************************************************************************"
|
||||||
printf "* %s: %s\\n" "Building and installing" "${BUILD_PERL_MODULES[$I]}"
|
printf "* %s: %s\\n" "Building and installing" "${BUILD_PERL_MODULES[I]}"
|
||||||
printf "%s\\033[0;39m\\n" "********************************************************************************"
|
printf "%s\\033[0;39m\\n" "********************************************************************************"
|
||||||
cpan -j "$BUILD_WORKDIR/$PKG_NAME-$PKG_VERSION/ModulesConfig.pm" -fi "${BUILD_PERL_MODULES[$I]}" || die "Module build failed: ${BUILD_PERL_MODULES[$I]}"
|
cpan -j "$BUILD_WORKDIR/$PKG_NAME-$PKG_VERSION/ModulesConfig.pm" -fi "${BUILD_PERL_MODULES[I]}" || die "Module build failed: ${BUILD_PERL_MODULES[I]}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue