#!/bin/sh
# @function install thriftLib()
function InstallThriftLib()
{
    ShowResult "[green]正在安装Thrift... [/green]" 1
    
    # tar to lib-path
    eval cd /usr/local/lib ${_SYS_SHOW_INSTALL_DETAILS_}
    eval tar zxvf ${_PATH_SOFTWARE_}/libthrift-complied* ${_SYS_SHOW_INSTALL_DETAILS_}
    
    # unzip to php-extension-path
    eval unzip ${_PATH_SOFTWARE_}/php-thrift* -d `/usr/local/php/bin/php-config --extension-dir` ${_SYS_SHOW_INSTALL_DETAILS_}
    chmod +x `/usr/local/php/bin/php-config --extension-dir`/*
    
    ShowStatus $?
}