2021-07-05 06:50:25 +00:00
|
|
|
#!/bin/bash
|
|
|
|
r_log "archive" "Checking gzexe"
|
|
|
|
r_log "archive" "Creating archive"
|
|
|
|
FILE=/var/tmp/gzexe-test-script
|
2023-11-14 00:14:57 +00:00
|
|
|
trap '/bin/rm -f $FILE* 2>/dev/null' EXIT
|
|
|
|
|
2021-07-05 06:50:25 +00:00
|
|
|
/bin/rm -f $FILE* &>/dev/null
|
|
|
|
|
|
|
|
cat > $FILE <<EOF
|
|
|
|
#!/bin/bash
|
|
|
|
echo "Hello!"
|
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod +x $FILE
|
|
|
|
$FILE | grep -q "Hello!" || r_checkExitStatus 1
|
|
|
|
|
|
|
|
r_log "archive" "Test gzexe"
|
|
|
|
/bin/gzexe $FILE &>/dev/null || r_checkExitStatus 1
|
|
|
|
|
|
|
|
r_log "archive" "Check that it actually runs"
|
|
|
|
$FILE | grep -q "Hello!"
|
|
|
|
r_checkExitStatus $?
|