2021-10-15 03:21:35 +00:00
|
|
|
#!/bin/bash
|
|
|
|
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
|
|
|
|
PROJECT_DIR=$(dirname "$BASE_DIR")
|
|
|
|
|
2022-03-25 02:35:59 +00:00
|
|
|
echo "1. 安装依赖"
|
2022-09-05 10:50:33 +00:00
|
|
|
brew install libtiff libjpeg webp little-cms2 openssl gettext git \
|
|
|
|
git-lfs mysql libxml2 libxmlsec1 pkg-config postgresql freetds openssl \
|
2023-06-07 09:28:35 +00:00
|
|
|
libffi freerdp
|
2021-10-15 03:21:35 +00:00
|
|
|
|
2022-03-25 02:35:59 +00:00
|
|
|
echo "2. 下载 IP 数据库"
|
2021-10-15 03:21:35 +00:00
|
|
|
ip_db_path="${PROJECT_DIR}/apps/common/utils/geoip/GeoLite2-City.mmdb"
|
|
|
|
wget "https://download.jumpserver.org/files/GeoLite2-City.mmdb" -O "${ip_db_path}"
|
2022-03-25 02:35:59 +00:00
|
|
|
|
|
|
|
echo "3. 安装依赖的插件"
|
|
|
|
git lfs install
|
2022-09-05 10:50:33 +00:00
|
|
|
|
|
|
|
if ! uname -a | grep 'ARM64' &> /dev/null;then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "4. For Apple processor"
|
|
|
|
LDFLAGS="-L$(brew --prefix freetds)/lib -L$(brew --prefix openssl@1.1)/lib" CFLAGS="-I$(brew --prefix freetds)/include" pip install $(grep 'pymssql' requirements.txt)
|