From 8e32cb58c9decd74d6a91b67c9bee7f960bda6c6 Mon Sep 17 00:00:00 2001 From: typebrook Date: Wed, 29 Jan 2020 01:19:01 +0800 Subject: update --- scripts/gist | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'scripts/gist') diff --git a/scripts/gist b/scripts/gist index 09d67c0..57da470 100755 --- a/scripts/gist +++ b/scripts/gist @@ -284,8 +284,7 @@ _create_gist() { [[ -z "$description" ]] && read -p 'Type description: ' description < /dev/tty for file in $files; do - filename=$(basename $file) - echo "\"$filename\": {\"content\": \"$(sed '$ !s/$/\\n/' $file)\"}," + echo "\"$(basename $file)\": {\"content\": \"$(sed '$ !s/$/\\n/' $file)\"}," done | tr -d '\n' | sed 's/^/{/; s/,$/}/' \ | echo "{ \"public\": true, \"files\": $(cat -), \"description\": \"$description\"}" \ | curl -s -H "$auth_header" --data @- $github_api/gists \ -- cgit v1.2.3-70-g09d2