#!/bin/sh g_cmd_sha=`grep "cmd1:" id.py |sed "s/cmd1://g" ` g_cmd_cn=`grep "cmd2:" id.py |sed "s/cmd2://g" ` echo '---setup principals' ./setup.py 1>id.log 2>&1 echo '---run with sha' eval $g_cmd_sha 1>id.sha 2>&1 echo '---run with cn' eval $g_cmd_cn 1>id_pre.cn 2>&1 cat id_pre.cn |sed 's/cert .*Tom_IDKEY.pem/cert Tom_IDKEY.pem/' > id.cn rm -rf id_pre.cn result=`diff id.cn id.save 2>/dev/null` if [ $? -eq 0 ]; then if [ "$result" = "" ]; then echo " PASSED" else echo " ERROR:id test result differs!!!" fi else echo " ERROR:id test result differs!!!" fi