more quoting

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2019-03-30 15:14:13 +01:00
parent 432f0bcf51
commit 0c144bcac2
1 changed files with 4 additions and 4 deletions

View File

@ -498,13 +498,13 @@ process_client() {
# source the script with source as param to use functions in other scripts
while [ "$1" == "startbot" ]; do {
UPDATE=$(curl -s $UPD_URL$OFFSET | ./JSON.sh/JSON.sh)
UPDATE="$(curl -s $UPD_URL$OFFSET | ./JSON.sh/JSON.sh)"
# Offset
OFFSET=$(echo "$UPDATE" | egrep '\["result",[0-9]*,"update_id"\]' | tail -1 | cut -f 2)
OFFSET="$(echo "$UPDATE" | egrep '\["result",[0-9]*,"update_id"\]' | tail -1 | cut -f 2)"
OFFSET=$((OFFSET+1))
if [ $OFFSET != 1 ]; then
if [ "$OFFSET" != "1" ]; then
if [ "$2" == "test" ]; then
process_updates "$2"
else
@ -518,7 +518,7 @@ while [ "$1" == "startbot" ]; do {
case "$1" in
"outproc")
until [ "$line" = "imprettydarnsuredatdisisdaendofdacmd" ];do
line=
line=""
read -t 10 line
[ "$line" != "" -a "$line" != "imprettydarnsuredatdisisdaendofdacmd" ] && send_message "$2" "$line"
done <$TMPDIR/$3