readwwwlog: Don't open terminal if already in terminal
This commit is contained in:
parent
cf6d630911
commit
837077ea39
|
@ -30,8 +30,13 @@ for url in ${urls}; do
|
||||||
sleep 1 # dpaste.com workaround
|
sleep 1 # dpaste.com workaround
|
||||||
local file="$(mktemp --suffix='.readwwwlog')"
|
local file="$(mktemp --suffix='.readwwwlog')"
|
||||||
curl --silent --location --output ${file} ${url}
|
curl --silent --location --output ${file} ${url}
|
||||||
${TERMINAL} ${termopts} -e \
|
|
||||||
less --LINE-NUMBERS --pattern='(error|fail):' ${file}
|
local -a cmd=(less --LINE-NUMBERS --pattern='(error|fail):' ${file})
|
||||||
|
if [[ -o NO_INTERACTIVE ]]; then
|
||||||
|
cmd=(${TERMINAL} ${termopts} -e ${cmd})
|
||||||
|
fi
|
||||||
|
${cmd}
|
||||||
|
|
||||||
rm ${file}
|
rm ${file}
|
||||||
else
|
else
|
||||||
${default_cmd} ${url}
|
${default_cmd} ${url}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user