Use GitHub releases for libcouchbase 2 on linux

This commit is contained in:
Shivam Mathur 2021-03-06 02:48:36 +05:30
parent a8dafdc2b5
commit cc316409b0
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -2,16 +2,20 @@
add_couchbase_libs() { add_couchbase_libs() {
if [ "$(uname -s)" = "Linux" ]; then if [ "$(uname -s)" = "Linux" ]; then
if [[ ${version:?} =~ 5.[3-6]|7.[0-1] ]]; then if [[ ${version:?} =~ 5.[3-6]|7.[0-1] ]]; then
trunk="http://packages.couchbase.com/ubuntu" release="2.10.9"
list="deb $trunk ${DISTRIB_CODENAME:?} ${DISTRIB_CODENAME:?}/main" trunk="https://github.com/couchbase/libcouchbase/releases/download"
package="libcouchbase-${release}_ubuntu${DISTRIB_RELEASE/./}_${DISTRIB_CODENAME}_amd64.tar"
get -q -n /tmp/libcouchbase.tar "$trunk/$release/$package"
sudo tar -xf /tmp/libcouchbase.tar -C /tmp
install_packages libev4
sudo dpkg -i /tmp/libcouchbase-*/*.deb
else else
trunk="http://packages.couchbase.com/clients/c/repos/deb" trunk="http://packages.couchbase.com/clients/c/repos/deb"
list="deb $trunk/ubuntu${DISTRIB_RELEASE/./} ${DISTRIB_CODENAME:?} ${DISTRIB_CODENAME:?}/main" list="deb $trunk/ubuntu${DISTRIB_RELEASE/./} ${DISTRIB_CODENAME:?} ${DISTRIB_CODENAME:?}/main"
get -s -n "" "$trunk/couchbase.key" | sudo apt-key add
echo "$list" | sudo tee /etc/apt/sources.list.d/couchbase.list
sudo apt-get update
fi fi
add_pecl
get -s -n "" "$trunk/couchbase.key" | sudo apt-key add
echo "$list" | sudo tee /etc/apt/sources.list.d/couchbase.list
sudo apt-get update
${apt_install:?} libcouchbase-dev ${apt_install:?} libcouchbase-dev
else else
if [[ ${version:?} =~ 5.[3-6]|7.[0-1] ]]; then if [[ ${version:?} =~ 5.[3-6]|7.[0-1] ]]; then