Add diagnostic echos
This commit is contained in:
4
download
4
download
@@ -78,12 +78,16 @@ download_github_directory() {
|
||||
|
||||
# Parse and download each file and directory recursively
|
||||
echo "$contents" | grep '"type": "file"' | sed -n 's|.*"path": "\([^"]*\)".*"download_url": "\([^"]*\)".*|"\1" "\2"|p' | while read -r file_path file_url; do
|
||||
echo "File Path: $file_path"
|
||||
echo "Download URL: $file_url"
|
||||
file_name=$(basename "$file_path" | tr -d '"')
|
||||
echo "Calling download: $file_url -> $output_dir/$file_name"
|
||||
download "$file_url" "$output_dir/$file_name"
|
||||
done
|
||||
|
||||
echo "$contents" | grep '"type": "dir"' | sed -n 's|.*"path": "\([^"]*\)".*|"\1"|p' | while read -r sub_dir; do
|
||||
sub_dir=$(echo "$sub_dir" | tr -d '"')
|
||||
echo "Recursively handling directory: $sub_dir"
|
||||
download_github_directory "https://github.com/$owner_repo/tree/$branch/$sub_dir" "$output_dir"
|
||||
done
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user