mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-05-05 14:46:20 +00:00
* perf: change lfs files download * perf: clean unused ansible module * perf: update lfs download * perf: Update Dockerfile with new base image tag * perf: change download path * perf: Update Dockerfile with new base image tag --------- Co-authored-by: ibuler <ibuler@qq.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
37 lines
848 B
Bash
37 lines
848 B
Bash
#!/bin/bash
|
|
|
|
CURRENT_DIR=$(cd "$(dirname "$0")" && pwd)
|
|
BASE_DIR=$(dirname "$CURRENT_DIR")
|
|
VERSION=v0.0.1
|
|
|
|
to_files="
|
|
apps/common/utils/ip/geoip/GeoLite2-City.mmdb
|
|
apps/common/utils/ip/ipip/ipipfree.ipdb
|
|
apps/accounts/automations/check_account/leak_passwords.db
|
|
"
|
|
|
|
if [[ $1 == "root" ]];then
|
|
BASE_DIR="${BASE_DIR}/jumpserver"
|
|
fi
|
|
|
|
|
|
for file in $to_files; do
|
|
# Check if the file already exists
|
|
file_path="${BASE_DIR}/$file"
|
|
rm -f $file_path
|
|
if [ -f "$file_path" ]; then
|
|
echo "File $file already exists, skipping download."
|
|
continue
|
|
fi
|
|
|
|
filename=$(basename "$file")
|
|
to_dir=$(dirname "$file_path")
|
|
if [ ! -d "$to_dir" ]; then
|
|
mkdir -p "$to_dir"
|
|
fi
|
|
url=""https://github.com/jumpserver/static/releases/download/${VERSION}/$filename""
|
|
echo "Download $filename to $file_path"
|
|
wget "$url" -O "${file_path}"
|
|
done
|
|
|