diff options
| -rwxr-xr-x | gist | 8 |
1 files changed, 5 insertions, 3 deletions
| @@ -508,9 +508,11 @@ _import_to_github() { | |||
| 508 | 508 | ||
| 509 | # Simply commit current changes and push to remote | 509 | # Simply commit current changes and push to remote |
| 510 | _push_to_remote() { | 510 | _push_to_remote() { |
| 511 | _gist_id "$1" || return 1 | 511 | if [[ ! `pwd` =~ ^$folder/[0-9a-z]+$ ]]; then |
| 512 | cd "$folder/$GIST_ID" && git add . \ | 512 | _gist_id "$1" |
| 513 | && git commit --allow-empty-message -m '' && git push origin master | 513 | cd "$folder/$GIST_ID" || return 1 |
| 514 | fi | ||
| 515 | git add . && git commit -m 'update' && git push origin master | ||
| 514 | } | 516 | } |
| 515 | 517 | ||
| 516 | # Set filename/description/permission for a new gist | 518 | # Set filename/description/permission for a new gist |