fix compatible

This commit is contained in:
boypt
2025-12-26 17:34:01 +08:00
parent a2ab36729c
commit 58291e2c48
2 changed files with 52 additions and 5 deletions

View File

@@ -71,19 +71,19 @@ TOPDIR_SELECT() {
case $DISTVER in
el8)
rpmtopdir=el7
[[ -z ${WITH_OPENSSL:-} ]] && WITH_OPENSSL=1
WITH_OPENSSL=${WITH_OPENSSL:-1}
;;
el7)
rpmtopdir=el7
[[ -z ${WITH_OPENSSL:-} ]] && WITH_OPENSSL=2
WITH_OPENSSL=${WITH_OPENSSL:-2}
;;
el6)
rpmtopdir=el6
[[ -z ${WITH_OPENSSL:-} ]] && WITH_OPENSSL=0
WITH_OPENSSL=${WITH_OPENSSL:-0}
;;
el5)
rpmtopdir=el5
[[ -z ${WITH_OPENSSL:-} ]] && WITH_OPENSSL=0
WITH_OPENSSL=${WITH_OPENSSL:-0}
# on centos5, it's prefered to use gcc44
rpm -q gcc44 2>&1 >/dev/null && export CC=gcc44
;;
@@ -177,4 +177,3 @@ if [[ ! -d $rpmtopdir ]]; then
fi
[[ -d $rpmtopdir ]] && BUILD_RPM

48
pullsrc-local.sh Executable file
View File

@@ -0,0 +1,48 @@
#!/usr/bin/env bash
# Bash3 Boilerplate. Copyright (c) 2014, kvz.io
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
trap 'echo -e "Aborted, error $? in command: $BASH_COMMAND"; trap ERR; exit 1' ERR
# Set magic variables for current file & dir
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
__base="$(basename ${__file} .sh)"
__root="$(cd "$(dirname "${__dir}")" && pwd)" # <-- change this as it depends on your app
arg1="${1:-}"
# trap 'echo Signal caught, cleaning up >&2; cd /tmp; /bin/rm -rfv "$TMP"; exit 15' 1 2 3 15
# allow command fail:
# fail_command || true
source version.env
# OPENSSHMIR=https://mirrors.aliyun.com/openssh/portable
OPENSSHMIR=https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable
OPENSSLMIR=https://www.openssl.org/source/
ASKPASSMIR=https://src.fedoraproject.org/repo/pkgs/openssh/x11-ssh-askpass-1.2.4.1.tar.gz/8f2e41f3f7eaa8543a2440454637f3c3
mkdir -p downloads
pushd downloads
if [[ ! -f $OPENSSLSRC ]]; then
echo "Get:" $OPENSSLMIR/$OPENSSLSRC
wget $OPENSSLMIR/$OPENSSLSRC
fi
if [[ ! -f $OPENSSHSRC ]]; then
echo Get: $OPENSSHMIR/$OPENSSHSRC
wget $OPENSSHMIR/$OPENSSHSRC
fi
if [[ ! -f $ASKPASSSRC ]]; then
echo Get: $ASKPASSMIR/$ASKPASSSRC
wget $ASKPASSMIR/$ASKPASSSRC
fi
[[ -f $OPENSSLSRC ]] && rclone -v copy $OPENSSLSRC 152:PKGDEV/
[[ -f $OPENSSHSRC ]] && rclone -v copy $OPENSSHSRC 152:PKGDEV/