Skip to content

Commit

Permalink
Merge pull request #1204 from nickcdon/main
Browse files Browse the repository at this point in the history
🔨 调整doc同步images脚本
  • Loading branch information
cyw3 authored Dec 25, 2024
2 parents 1820d93 + 84ca18c commit c6ca285
Showing 1 changed file with 32 additions and 17 deletions.
49 changes: 32 additions & 17 deletions doc/sync_images.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
#!/bin/bash

url=${LIB_GITHUB_URL:-"https://github.com/TCATools/tca_lib/releases/download/v20241015.1/tca_lib-v1.8.zip"}

filename=$(basename "$url")
dirname=${filename%.*}

lib_image_path="${dirname}/tca_lib/doc/images"
image_path="images"

if [[ ! -d $image_path ]]; then
if [[ ! -d $lib_image_path ]]; then
if [[ ! -f $filename ]]; then
wget $url
fi
unzip $filename -d $dirname
fi
cp -r $lib_image_path $image_path
fi
# url=${LIB_GITHUB_URL}

# filename=$(basename "$url")
# dirname=${filename%.*}

# lib_image_path="${dirname}/tca_lib/doc/images"
# image_path="images"

# if [[ ! -d $image_path ]]; then
# if [[ ! -d $lib_image_path ]]; then
# if [[ ! -f $filename ]]; then
# wget $url
# fi
# unzip $filename -d $dirname
# fi
# cp -r $lib_image_path $image_path
# fi

# 当前
CURRENT_PATH=$(
cd "$(dirname "${BASH_SOURCE[0]}")"
pwd
)

# 根目录
ROOT_PATH=$(dirname "${CURRENT_PATH}")

cd ${ROOT_PATH}

bash "${ROOT_PATH}"/scripts/base/install_bin.sh

cd ${CURRENT_PATH}

0 comments on commit c6ca285

Please sign in to comment.