summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-02-04 11:05:29 +0800
committertypebrook <typebrook@gmail.com>2020-02-04 11:05:29 +0800
commit1ffcf709066caf4acd13062e4ee520c537688e17 (patch)
tree71a79362c6a1d029cb2d2aaa972161481b46bfef
parente507ca1e7ed4ecbd057feafb2c797b8a8e154969 (diff)
update
-rwxr-xr-xscripts/gist5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/gist b/scripts/gist
index cf312a6..d614c98 100755
--- a/scripts/gist
+++ b/scripts/gist
@@ -250,11 +250,11 @@ _update() {
250 echo 250 echo
251 local route="users/$user/gists" 251 local route="users/$user/gists"
252 local mark="" 252 local mark=""
253 local filter='/^[^s]/ d' 253 local filter='/^[^s]/ d; /^$/ d'
254 if [[ "$1" =~ ^(star|s)$ ]];then 254 if [[ "$1" =~ ^(star|s)$ ]];then
255 route="gists/starred" 255 route="gists/starred"
256 mark="s" 256 mark="s"
257 filter='/^[s]/ d' 257 filter='/^[s]/ d; /^$/ d'
258 fi 258 fi
259 259
260 result=$(http_method GET $GITHUB_API/$route | _parse_response) 260 result=$(http_method GET $GITHUB_API/$route | _parse_response)
@@ -431,7 +431,6 @@ _create_gist() {
431 echo -e "$files\n$description" \ 431 echo -e "$files\n$description" \
432 | AccessJsonElement "$(_gist_body)" > $http_data \ 432 | AccessJsonElement "$(_gist_body)" > $http_data \
433 && http_method POST $GITHUB_API/gists \ 433 && http_method POST $GITHUB_API/gists \
434 | tee result \
435 | sed '1 s/^/[/; $ s/$/]/' \ 434 | sed '1 s/^/[/; $ s/$/]/' \
436 | _parse_response $(( $(sed '/^s/ d' $INDEX | wc -l) +1 )) >> $INDEX 435 | _parse_response $(( $(sed '/^s/ d' $INDEX | wc -l) +1 )) >> $INDEX
437 436