3.1.x_opensource_release support obd 3.1.x_opensource_release support obd 3.1.x_opensource_release support obd
This commit is contained in:
parent
21564ec61d
commit
c2c7336b2b
104
deps/3rd/dep_create.sh
vendored
104
deps/3rd/dep_create.sh
vendored
@ -103,42 +103,78 @@ fi
|
||||
|
||||
mkdir "${PWD}/pkg" >/dev/null 2>&1
|
||||
|
||||
echo -e "check repository address in profile... \c"
|
||||
REPO="$(grep -Po '(?<=repo=).*' "${DEP_FILE}" 2>/dev/null)"
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo "$REPO"
|
||||
else
|
||||
echo "NOT FOUND" 1>&2
|
||||
exit 3
|
||||
fi
|
||||
declare -A targets
|
||||
declare -A packages
|
||||
section="default"
|
||||
content=""
|
||||
|
||||
function save_content {
|
||||
if [[ "$content" != "" ]]
|
||||
then
|
||||
if [[ $(echo "$section" | grep -E "^target\-") != "" ]]
|
||||
then
|
||||
target_name=$(echo $section | sed 's|^target\-\(.*\)$|\1|g')
|
||||
targets["$target_name"]="$(echo "${content["$section"]}" | grep -Eo "repo=.*" | awk -F '=' '{ print $2 }')"
|
||||
echo "target: $target_name, repo: ${targets["$target_name"]}"
|
||||
else
|
||||
packages["$section"]=$content
|
||||
fi
|
||||
fi
|
||||
}
|
||||
echo -e "check repository address in profile..."
|
||||
|
||||
while read -r line
|
||||
do
|
||||
if [[ $(echo "$line" | grep -E "\[.*\]") != "" ]]
|
||||
then
|
||||
save_content
|
||||
content=""
|
||||
# section=${line//\[\(.*\)\]/\1}
|
||||
section=$(echo $line | sed 's|.*\[\(.*\)\].*|\1|g')
|
||||
else
|
||||
[[ "$line" != "" ]] && [[ "$line" != '\#*' ]] && content+=$'\n'"$line"
|
||||
fi
|
||||
done < oceanbase.el7.x86_64.deps
|
||||
save_content
|
||||
|
||||
echo "download dependencies..."
|
||||
RPMS="$(grep '\.rpm' "${DEP_FILE}" | grep -Pv '^#')"
|
||||
|
||||
for pkg in $RPMS
|
||||
for sect in "${!packages[@]}"
|
||||
do
|
||||
if [[ -f "${PWD}/pkg/${pkg}" ]]; then
|
||||
echo "find package <${pkg}> in cache"
|
||||
else
|
||||
echo -e "download package <${pkg}>... \c"
|
||||
TEMP=$(mktemp -p "/" -u ".${pkg}.XXXX")
|
||||
wget "$REPO/${pkg}" -q -O "${PWD}/pkg/${TEMP}"
|
||||
if [[ $? -eq 0 ]]; then
|
||||
mv -f "${PWD}/pkg/$TEMP" "${PWD}/pkg/${pkg}"
|
||||
echo "SUCCESS"
|
||||
else
|
||||
rm -rf "${PWD}/pkg/$TEMP"
|
||||
echo "FAILED" 1>&2
|
||||
exit 4
|
||||
if [[ "$1" != "all" ]]
|
||||
then
|
||||
[[ "$sect" == "test-utils" ]] && continue
|
||||
fi
|
||||
fi
|
||||
echo -e "unpack package <${pkg}>... \c"
|
||||
rpm2cpio "${PWD}/pkg/${pkg}" | cpio -di -u --quiet
|
||||
echo "${packages["$sect"]}" | while read -r line
|
||||
do
|
||||
[[ "$line" == "" ]] && continue
|
||||
pkg=${line%%\ *}
|
||||
target_name="default"
|
||||
temp=$(echo "$line" | grep -Eo "target=(\S*)")
|
||||
[[ "$temp" != "" ]] && target_name=${temp#*=}
|
||||
if [[ -f "${PWD}/pkg/${pkg}" ]]; then
|
||||
echo "find package <${pkg}> in cache"
|
||||
else
|
||||
echo -e "download package <${pkg}>... \c"
|
||||
repo=${targets["$target_name"]}
|
||||
TEMP=$(mktemp -p "/" -u ".${pkg}.XXXX")
|
||||
wget "$repo/${pkg}" -q -O "${PWD}/pkg/${TEMP}"
|
||||
if (( $? == 0 )); then
|
||||
mv -f "${PWD}/pkg/$TEMP" "${PWD}/pkg/${pkg}"
|
||||
echo "SUCCESS"
|
||||
else
|
||||
rm -rf "${PWD}/pkg/$TEMP"
|
||||
echo "FAILED" 1>&2
|
||||
exit 4
|
||||
fi
|
||||
fi
|
||||
echo -e "unpack package <${pkg}>... \c"
|
||||
rpm2cpio "${PWD}/pkg/${pkg}" | cpio -di -u --quiet
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo "SUCCESS"
|
||||
else
|
||||
echo "FAILED" 1>&2
|
||||
exit 5
|
||||
fi
|
||||
done
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo "SUCCESS"
|
||||
else
|
||||
echo "FAILED" 1>&2
|
||||
exit 5
|
||||
fi
|
||||
done
|
||||
done
|
2
deps/3rd/oceanbase.el7.aarch64.deps
vendored
2
deps/3rd/oceanbase.el7.aarch64.deps
vendored
@ -1,4 +1,4 @@
|
||||
[target]
|
||||
[target-default]
|
||||
os=7
|
||||
arch=aarch64
|
||||
repo=http://mirrors.aliyun.com/oceanbase/development-kit/el/7/aarch64/
|
||||
|
7
deps/3rd/oceanbase.el7.x86_64.deps
vendored
7
deps/3rd/oceanbase.el7.x86_64.deps
vendored
@ -1,15 +1,15 @@
|
||||
[target]
|
||||
[target-default]
|
||||
os=7
|
||||
arch=x86_64
|
||||
repo=http://mirrors.aliyun.com/oceanbase/development-kit/el/7/x86_64/
|
||||
|
||||
[deps]
|
||||
devdeps-gtest-1.8.0-3.el7.x86_64.rpm
|
||||
devdeps-gtest-1.8.0-3.el7.x86_64.rpm
|
||||
devdeps-isa-l-static-2.22.0-3.el7.x86_64.rpm
|
||||
devdeps-libcurl-static-7.29.0-3.el7.x86_64.rpm
|
||||
devdeps-libunwind-static-1.5.0-3.el7.x86_64.rpm
|
||||
devdeps-mariadb-connector-c-3.1.12-3.el7.x86_64.rpm
|
||||
devdeps-openssl-static-1.0.1e-3.el7.x86_64.rpm
|
||||
devdeps-openssl-static-1.0.1e-3.el7.x86_64.rpm
|
||||
devdeps-libaio-0.3.112-3.el7.x86_64.rpm
|
||||
devdeps-rapidjson-1.1.0-1.el7.x86_64.rpm
|
||||
|
||||
@ -21,3 +21,4 @@ obdevtools-cmake-3.20.2-3.el7.x86_64.rpm
|
||||
obdevtools-flex-2.5.35-3.el7.x86_64.rpm
|
||||
obdevtools-gcc-5.2.0-3.el7.x86_64.rpm
|
||||
obdevtools-llvm-11.0.1-3.el7.x86_64.rpm
|
||||
|
||||
|
2
deps/3rd/oceanbase.el8.x86_64.deps
vendored
2
deps/3rd/oceanbase.el8.x86_64.deps
vendored
@ -1,4 +1,4 @@
|
||||
[target]
|
||||
[target-default]
|
||||
os=8
|
||||
arch=x86_64
|
||||
repo=http://mirrors.aliyun.com/oceanbase/development-kit/el/8/x86_64/
|
||||
|
Loading…
x
Reference in New Issue
Block a user