diff options
| -rwxr-xr-x | scripts/gist | 5 |
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 | ||