mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-04-28 03:21:12 +00:00
* perf: update dependency * perf: remove source build * perf: Update Dockerfile with new base image tag * perf: use cache build * perf: Update Dockerfile with new base image tag * fix: variable incorrectly defined * perf: Update Dockerfile with new base image tag * fix: openpyxl fixed version * perf: Update Dockerfile with new base image tag * perf: remove cache * perf: Update Dockerfile with new base image tag * perf: update pyproject.toml * perf: Update Dockerfile with new base image tag * perf: remove cache * perf: Update Dockerfile with new base image tag --------- Co-authored-by: 吴小白 <296015668@qq.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
36 lines
999 B
Bash
36 lines
999 B
Bash
#!/bin/bash
|
|
|
|
lib_path="/opt/py3/lib/python3.11/site-packages"
|
|
|
|
# 清理不需要的模块
|
|
need_clean="jedi"
|
|
for i in $need_clean; do
|
|
rm -rf "${lib_path}/${i}"
|
|
done
|
|
|
|
# 清理 ansible connection 中 不需要的模块
|
|
ansible_connection="${lib_path}/ansible_collections"
|
|
need_clean="fortinet dellemc f5networks netapp theforeman google azure cyberark ibm
|
|
netbox purestorage inspur netapp_eseries sensu check_point vyos arista"
|
|
for i in $need_clean; do
|
|
echo "rm -rf ${ansible_connection:-tmp}/${i}"
|
|
rm -rf "${ansible_connection:-tmp}/${i}"
|
|
done
|
|
|
|
# 清理缓存文件
|
|
cd ${lib_path} || exit 1
|
|
find . -name "*.pyc" -exec rm -f {} \;
|
|
|
|
# 清理不需要的国际化文件
|
|
find . -name 'locale' -o -name 'locales' -type d | while read -r dir; do
|
|
find "$dir" -mindepth 1 -maxdepth 1 -type d \
|
|
! -name 'zh_Hans' \
|
|
! -name 'zh_Hant' \
|
|
! -name 'zh_CN' \
|
|
! -name 'en' \
|
|
! -name 'en_US' \
|
|
! -name 'ja' \
|
|
! -name 'fr' \
|
|
-exec rm -rf {} \;
|
|
done
|