Skip to content

Commit

Permalink
Merge pull request #6 from Meng-Heng/c/v10-patch-2
Browse files Browse the repository at this point in the history
test: get directory #2
  • Loading branch information
Meng-Heng authored Sep 13, 2024
2 parents 8d09f96 + b65509f commit 1013c64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bootstrap.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function _bootstrap_download() {
local remote_file="$1"
local local_file="$2"

if [[ -d "$remote_file"]] then
if [[ -d "$remote_file" ]]; then
_bootstrap_echo "Downloading directory: $remote_file"

for file in $(find "$remote_file" -type f); do
Expand All @@ -60,15 +60,15 @@ function _bootstrap_download() {

mkdir -p "$(dirname "$target_file")"

curl -fsL "https://raw.githubusercontent.com/keymanapp/shared-sites/$BOOTSTRAP_VERSION/$relative_path" -o "$target_file" || (
curl -fsL "https://raw.githubusercontent.com/Meng-Heng/shared-sites/refs/heads/$BOOTSTRAP_VERSION/$relative_path" -o "$target_file" || (
_bootstrap_echo "FATAL: Failed to download $target_file"
exit 3
)
done
else
_bootstrap_echo " Downloading $remote_file"

curl -fsL "https://raw.githubusercontent.com/keymanapp/shared-sites/$BOOTSTRAP_VERSION/$remote_file" -o "$local_file" || (
curl -fsL "https://raw.githubusercontent.com/Meng-Heng/shared-sites/refs/heads/$BOOTSTRAP_VERSION/$remote_file" -o "$local_file" || (
_bootstrap_echo "FATAL: Failed to download $remote_file"
exit 3
)
Expand Down

0 comments on commit 1013c64

Please sign in to comment.