toolkit/func/core/pkg_wget/10-test-wget.sh

14 lines
251 B
Bash
Raw Normal View History

2021-07-05 06:50:25 +00:00
#!/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}