fix: build cook ocs under ub22 use ub12 env
This commit is contained in:
21
bin/build.sh
21
bin/build.sh
@@ -145,12 +145,16 @@ make_ocs_bin()
|
||||
if [ -z $bin_tag ]; then
|
||||
bin_tag="pncc"
|
||||
fi
|
||||
|
||||
# 如果是build cook版本且当前为Ubuntu22,则调用Ubuntu 12.04容器打包
|
||||
if [ "$bin_tag" = "cook" ] && [ "$rel_os" = "ub22" ]; then
|
||||
echo "Detected cook build on Ubuntu 22.04, switching to Ubuntu 12.04 container environment."
|
||||
make_cook_ocs_bin_in_ub12
|
||||
exit $?
|
||||
fi
|
||||
|
||||
cd $src_ocs_dir
|
||||
if [ $bin_tag = "cook" ]; then
|
||||
if [ $rel_os = "ub22" ]; then
|
||||
echo "Ubuntu 22.04 is not supported"
|
||||
exit 1
|
||||
fi
|
||||
git checkout cook
|
||||
git pull
|
||||
else
|
||||
@@ -172,6 +176,11 @@ make_ocs_bin()
|
||||
cd $OLDPWD
|
||||
}
|
||||
|
||||
make_cook_ocs_bin_in_ub12()
|
||||
{
|
||||
docker exec -it ubuntu12-dev /bin/bash -c "cd ~/ocs.git/build/bin && ./build.sh ocs -t cook"
|
||||
}
|
||||
|
||||
make_cproxy_bin()
|
||||
{
|
||||
cd $src_cproxy_dir
|
||||
@@ -218,7 +227,11 @@ pre_common_build()
|
||||
{
|
||||
test -d $deb_build_dir || mkdir -p $deb_build_dir
|
||||
cd $deb_build_dir
|
||||
current_dir=`pwd`
|
||||
if [[ "$current_dir" =~ "debbuild" ]]; then
|
||||
rm -rf *
|
||||
fi
|
||||
|
||||
mkdir -p $deb_build_dir/DEBIAN
|
||||
cd $OLDPWD
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user