diff options
-rwxr-xr-x | gist | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -315,9 +315,10 @@ _parse_response() { | |||
315 | | tac | sed -e 's/, /,/g' | nl -s' ' \ | 315 | | tac | sed -e 's/, /,/g' | nl -s' ' \ |
316 | | while read -r index link file_url_array public file_num comment_num author description; do | 316 | | while read -r index link file_url_array public file_num comment_num author description; do |
317 | local blob_code; blob_code=$(echo "$file_url_array" | tr ',' '\n' | sed -E -e 's#.*raw/(.*)/.*#\1#' | sort | cut -c -7 | paste -s -d '-' -) | 317 | local blob_code; blob_code=$(echo "$file_url_array" | tr ',' '\n' | sed -E -e 's#.*raw/(.*)/.*#\1#' | sort | cut -c -7 | paste -s -d '-' -) |
318 | [[ $public == 'False' ]] && local mark=p || local mark='' | 318 | local prefix=$mark |
319 | [[ $public == 'False' ]] && prefix=p | ||
319 | [[ -n $1 ]] && local index=$1 | 320 | [[ -n $1 ]] && local index=$1 |
320 | echo "$mark$index $link $blob_code $file_num $comment_num $author $description" | tr -d '"' | 321 | echo "$prefix$index $link $blob_code $file_num $comment_num $author $description" | tr -d '"' |
321 | done | 322 | done |
322 | } | 323 | } |
323 | 324 | ||