mirror of https://github.com/oceanbase/ob-deps.git
17 lines
564 B
Bash
17 lines
564 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
CUR_DIR=$(dirname $(readlink -f "$0"))
|
||
|
ROOT_DIR=$CUR_DIR/../
|
||
|
PROJECT_DIR=${1:-"$CUR_DIR"}
|
||
|
PROJECT_NAME=${2:-"devdeps-libaio"}
|
||
|
VERSION=${3:-"0.3.112"}
|
||
|
RELEASE=${4:-"1"}
|
||
|
|
||
|
# check source code
|
||
|
if [[ -z `find $ROOT_DIR -maxdepth 1 -regex ".*/libaio-$VERSION.*[tar|gz|bz2|xz|zip]$"` ]]; then
|
||
|
echo "Download source code"
|
||
|
wget --no-check-certificate https://ftp.debian.org/debian/pool/main/liba/libaio/libaio_0.3.112.orig.tar.xz -O $ROOT_DIR/libaio-$VERSION.tar.xz
|
||
|
fi
|
||
|
|
||
|
cd $CUR_DIR
|
||
|
bash $CUR_DIR/rpmbuild.sh $PROJECT_DIR $PROJECT_NAME $VERSION $RELEASE
|