2021-07-05 06:50:25 +00:00
|
|
|
#!/bin/bash
|
|
|
|
r_log "archive" "Testing lzop compress and decompress"
|
|
|
|
|
|
|
|
LZOFILE=/var/tmp/obsidian.txt
|
2023-11-14 00:14:57 +00:00
|
|
|
trap '/bin/rm ${LZOFILE}' EXIT
|
2021-07-05 06:50:25 +00:00
|
|
|
|
|
|
|
echo 'Green Obsidian is the release name' > ${LZOFILE}
|
|
|
|
|
|
|
|
# running compression
|
|
|
|
lzop -9 ${LZOFILE} -o ${LZOFILE}.lzo
|
|
|
|
/bin/rm ${LZOFILE}
|
|
|
|
|
|
|
|
lzop -d ${LZOFILE}.lzo -o ${LZOFILE}
|
|
|
|
/bin/rm ${LZOFILE}.lzo
|
|
|
|
|
|
|
|
grep -q 'Green Obsidian' ${LZOFILE}
|
2023-11-14 00:14:57 +00:00
|
|
|
ret_val="$?"
|
|
|
|
r_checkExitStatus "$ret_val"
|