1
0
Fork 0

readwwwlog: Use elif

This commit is contained in:
tastytea 2022-04-18 05:42:55 +02:00
parent 7903624fcf
commit 8f017a3211
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 2 additions and 4 deletions

View File

@ -20,11 +20,9 @@ local termopts=""
for url in ${urls}; do
if [[ ${url} =~ 'dpaste\.com' && ! ${url[-4,-1]} == ".txt" ]]; then
url+=".txt"
fi
if [[ ${url} =~ 'pastebin\.com' && ! ${url} =~ '/raw/' ]]; then
elif [[ ${url} =~ 'pastebin\.com' && ! ${url} =~ '/raw/' ]]; then
url="https://pastebin.com/raw/${url##*/}"
fi
if [[ ${url} =~ 'irccloud\.com' && ! ${url} =~ '/raw/' ]]; then
elif [[ ${url} =~ 'irccloud\.com' && ! ${url} =~ '/raw/' ]]; then
local id=${${(@s:/:)url}[4]}
url="https://www.irccloud.com/pastebin/raw/${id}"
fi