21 lines
434 B
Bash
Executable File
21 lines
434 B
Bash
Executable File
#!/bin/sh
|
|
|
|
invite="${1?invite}"
|
|
code="${invite##*~}"
|
|
addr="${invite%%~*}"
|
|
feed="${addr##*:}"
|
|
hostname="${addr%:*}"
|
|
host="${hostname%:*}"
|
|
port="${hostname##*:}"
|
|
|
|
out="$(sbotc -s "$host" -p "$port" -k "$feed" -K "$code" -t async invite.use {} 2>&1)"
|
|
if echo "$out" | grep -q 'feed to follow is missing'
|
|
then
|
|
echo success
|
|
else
|
|
echo fail
|
|
echo "$out"
|
|
sbotc -s "$host" -p "$port" -k "$feed" -K "$code" -t source blobs.get ''
|
|
exit 1
|
|
fi
|