testscar.sh

来自「jpeg2000编解码」· Shell 代码 · 共 42 行

SH
42
字号
#!/bin/sh##  TestScar.sh - run a quick test to see if scar is all there#  and basically working.##  Dependencies: CLASSPATH must be se to find all classes needed.#set -xvarg="v"# done in place, and locally for now as scar does not handle absolute# pathnames well, and cd'ing might change the nature of the CLASSPATH# cd /tmptmp=.scar$$trap "rm -rf ${tmp}in ${tmp}out ${tmp}archive" 0##   Make a toy directory.#mkdir ${tmp}in ${tmp}outecho 1111111111111 > ${tmp}in/oneecho 2222222222222 > ${tmp}in/twoecho 3333333333333 > ${tmp}in/three##   Archive it, extract it, and compare the extraction  with the original.#java cryptix.tools.Scar -e${varg}r -p "test"  ${tmp}in  ${tmp}archive[ $? -ne 0 ] && echo Scar encrypt failed $? && exit 1java cryptix.tools.Scar -d${varg} -p "test"  ${tmp}archive ${tmp}out[ $? -ne 0 ] && echo Scar decrypt failed $? && exit 1for file in ${tmp}in/*do    cmp ${file} ${tmp}out/${file##*/} || exit 1doneexit 0

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?