toolkit/func/core/pkg_wget/10-test-wget.sh
2021-07-04 23:50:25 -07:00

14 lines
251 B
Bash
Executable File

#!/bin/bash
r_log "wget" "Test wget works as intended"
URL=http://dl.rockylinux.org
FILE=/var/tmp/dlrocky.html
CHECK="pub/"
r_log "wget" "Querying: ${URL}"
wget -q -O ${FILE} ${URL}
grep -q "${CHECK}" "${FILE}"
r_checkExitStatus $?
/bin/rm ${FILE}