summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-02-03 08:11:33 +0800
committertypebrook <typebrook@gmail.com>2020-02-03 08:11:33 +0800
commit6c378afeaaed37ed305b9a18d6b0486f92baa6c5 (patch)
tree8a7fd24704c443cce849ddc706faa69f540134b2
parente823fd2b96f8e12a3ebd1de005ffa401299cbf9c (diff)
foo
-rwxr-xr-xscripts/gist6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/gist b/scripts/gist
index 5874bc5..86676f4 100755
--- a/scripts/gist
+++ b/scripts/gist
@@ -418,11 +418,11 @@ _create_gist() {
418 | echo "{ \"public\": $public, \"files\": $(cat -), \"description\": \"$description\"}" \ 418 | echo "{ \"public\": $public, \"files\": $(cat -), \"description\": \"$description\"}" \
419 | http_method POST $GITHUB_API/gists \ 419 | http_method POST $GITHUB_API/gists \
420 | sed '1 s/^/[/; $ s/$/]/' \ 420 | sed '1 s/^/[/; $ s/$/]/' \
421 | _parse_response $index >> $INDEX 421 | _parse_response $index
422 422
423 if [[ $? -eq 0 ]]; then 423 if [[ -n "$result" ]]; then
424 echo 'Gist is created' 424 echo 'Gist is created'
425 _show_list | tail -1 425 echo $result >> $INDEX && _show_list | tail -1
426 else 426 else
427 echo 'Failed to create gist' 427 echo 'Failed to create gist'
428 fi 428 fi