diff options
author | mrjive <mrjive@mrjive.it> | 2016-01-15 20:58:10 +0100 |
---|---|---|
committer | mrjive <mrjive@mrjive.it> | 2016-01-15 20:58:10 +0100 |
commit | 763c700372ee91f3f840c6fba915cb4d941c34a0 (patch) | |
tree | 1d7e4a7f19825b6417764e2c46d3cd109f94b075 /util/hz | |
parent | 2696deb2a18ba06593657a2317176baa26821708 (diff) | |
parent | 2498df68c716ec6ed80b5547c721ca9741a85572 (diff) | |
download | volse-hubzilla-763c700372ee91f3f840c6fba915cb4d941c34a0.tar.gz volse-hubzilla-763c700372ee91f3f840c6fba915cb4d941c34a0.tar.bz2 volse-hubzilla-763c700372ee91f3f840c6fba915cb4d941c34a0.zip |
Merge pull request #17 from redmatrix/master
updating from original codebase
Diffstat (limited to 'util/hz')
-rwxr-xr-x | util/hz | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -12,7 +12,7 @@ echo " USER=youruserame " echo " PASS=yourpass" echo " HUB=your.hub.domain.org" echo -echo "Type \"hz\" (with or without a conf file as an arg), then enter your message. Hit ENTER to send." +echo "Type \"hz\" (with or without a conf file as an arg), then enter your message. Use ctrl-D to send.." } @@ -29,8 +29,10 @@ CUR=`which curl` [ "$PASS" ] || { echo "no PASS"; usage; exit 1; } [ "$HUB" ] || { echo "no HUB"; usage; exit 1; } -echo "enter your message to be posted as $USER @ $HUB, then hit ENTER to send:" +echo "enter your message to be posted as $USER @ $HUB, then hit Ctrl-D to send." -(read MSG; curl -ssl -u${USER}:${PASS} --data-urlencode "status=${MSG}" https://${HUB}/api/statuses/update ) +MSG=$(cat) + +curl -ssl -u${USER}:${PASS} --data-urlencode "status=${MSG}" https://${HUB}/api/statuses/update |