mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/boypt/openssh-rpms.git
synced 2026-09-20 08:03:38 +08:00
check exists
This commit is contained in:
17
compile.sh
17
compile.sh
@@ -22,16 +22,25 @@ rpmtopdir="${1:-}"
|
||||
|
||||
|
||||
if [[ ! -d $rpmtopdir ]]; then
|
||||
echo "only work in el5/el6/el7"
|
||||
echo "eg: ${0} el7"
|
||||
exit 1
|
||||
echo "only work in el5/el6/el7"
|
||||
echo "eg: ${0} el7"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source version.env
|
||||
|
||||
CHECKEXISTS() {
|
||||
if [[ ! -f $__dir/downloads/$1 ]];then
|
||||
echo "$1 not found, run 'downloadsrc.sh', or manually put it in the downloads dir."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
CHECKEXISTS $OPENSSHSRC
|
||||
CHECKEXISTS $OPENSSLSRC
|
||||
install -v -m666 $__dir/downloads/$OPENSSLSRC $rpmtopdir/SOURCES/
|
||||
install -v -m666 $__dir/downloads/$OPENSSHSRC $rpmtopdir/SOURCES/
|
||||
|
||||
pushd $rpmtopdir
|
||||
mkdir -p SOURCES SPECS BUILD SRPMS RPMS
|
||||
rpmbuild -ba SPECS/openssh.spec --target $(uname -m) --define "_topdir $PWD"
|
||||
popd
|
||||
|
||||
Reference in New Issue
Block a user