Skip to content

Commit 16eb4a5

Browse files
author
aktos electronics
committed
prints upload url
1 parent d8add08 commit 16eb4a5

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

create-gist.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,15 @@ EOF
4949

5050
if [[ "$GITHUB_USERNAME" != "" ]]; then
5151
# REGISTERED USER
52-
curl -u "${GITHUB_USERNAME}" -X POST -d "${DESC}" "https://api.github.com/gists"
52+
OUTPUT=$(curl -u "${GITHUB_USERNAME}" -X POST -d "${DESC}" "https://api.github.com/gists")
5353
else
5454
# ANONYMOUS GIST :
55-
curl -X POST -d "${DESC}" "https://api.github.com/gists"
55+
OUTPUT=$(curl -X POST -d "${DESC}" "https://api.github.com/gists")
5656
fi
57+
58+
echo "$OUTPUT"
59+
60+
echo "-----------------"
61+
echo " URL: "
62+
echo "-----------------"
63+
echo "$OUTPUT" | grep 'raw_url'

0 commit comments

Comments
 (0)