代码拉取完成,页面将自动刷新
同步操作将从 alibaba/PolarDB-for-PostgreSQL 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
echo "This script configure and build the code, It takes an optional"
echo "parameter that must be one of the following:"
echo " deploy: (default) configure the build with performance"
echo " optimization options and build."
echo " verify: configure the build with performance optimzation"
echo " with assertion enabled, and then build"
echo " debug: configure the build with debug options and then"
echo " build."
echo " repeat: skip configure, just build and install"
echo ""
set -e
pushd "$( dirname "${BASH_SOURCE[0]}" )"
CODEHOME=$PWD
if [ -z $PG_INSTALL ];
then
PG_INSTALL=$HOME/polarx/polarxhome
fi
echo "PG installation dir: "$PG_INSTALL
PGBIN=$PG_INSTALL/bin
if [ $# -gt 0 ]; then
BLD_OPT=$1
else
BLD_OPT="deploy"
fi
CMD=()
CFLAGS="-fno-omit-frame-pointer -Wno-declaration-after-statement"
LDFLAGS="-L/usr/local/lib"
if [[ "$BLD_OPT" == "deploy" ]]; then
CFLAGS="${CFLAGS} -g -O2"
CMD+=(--with-python)
elif [[ "$BLD_OPT" == "verify" ]]; then
CFLAGS="${CFLAGS} -g -O2"
CMD+=(--enable-cassert)
CMD+=(--with-python)
# CMD+=(--with-openssl)
elif [[ "$BLD_OPT" == "debug" ]]; then
CFLAGS="${CFLAGS} -ggdb -Og -g3 "
# CMD+=(--with-uuid=ossp --with-openssl)
CMD+=(--enable-cassert)
CMD+=(--with-python)
CMD+=(--enable-debug)
elif [[ "$BLD_OPT" != "repeat" ]]; then
echo "Invalid Parameter! Usage: $0 [deploy|verify|debug|repeat]"
popd
exit
fi
if [[ "$BLD_OPT" != "repeat" ]]; then
export CFLAGS
export LDFLAGS
./configure --prefix=$PG_INSTALL ${CMD[@]}
fi
make -sj 16
make install
# extensions
export PATH=$PGBIN:$PATH
export PG_CONFIG=$PGBIN/pg_config
cd $CODEHOME/contrib && make -sj &&make install
cd $CODEHOME/contrib/pg_cron && make && make install
cd $CODEHOME/src/pl/plpython && make install
echo "============> Enjoy coding! <==============="
echo "You could add $PGBIN to your PATH"
popd
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。