run-all

来自「读写Smart卡加解密接口的程序」· 代码 · 共 50 行

TXT
50
字号
#!/bin/bashmkdir -p outscripts=""options=""abort_if_fail=truewhile [ $# -gt 0 ]; do	opt=$1; shift	case $opt in	--continue)		abort_if_fail=false;;	--reader)		options="$options $opt $1"		shift;;	-*)	options="$options $opt";;	*)	scripts="$scripts $opt";;	esacdoneif [ -z "$scripts" ]; then	scripts=`ls init* crypt*`fifor script in $scripts; do	echo -n "${script}... "	if ./$script $options >out/$script 2>&1; then		echo "success"	else		mkdir -p failed		failed="failed/$script"		rm -rf $failed		mv test-data $failed		echo "fail (test data moved to $failed)"		if $abort_if_fail; then			echo Aborting.			exit 1		fi		echo -n "Wiping card... "		if ./erase $options >out/erase 2>&1; then			echo done		else			echo failed.			exit 1		fi	fidoneexit 0

⌨️ 快捷键说明

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