tar.sh

来自「iscsi源代码 UNH的progect 有initiator端和target端」· Shell 代码 · 共 47 行

SH
47 行
字号
## Generate a tarball . Called from the Makefile(s)#if [ ! -f unh_iscsi.specfile ]; then	echo "This command needs executed at the source directory level!"	exit 1fiMAJREV=`egrep "^%define  version" unh_iscsi.specfile | awk '{print $3}'`MINREV=`egrep "^%define  release" unh_iscsi.specfile | awk '{print $3}'`TAR_NAME=`echo unh_iscsi-$MAJREV.$MINREV.tar.gz`DIR_NAME=`echo unh_iscsi.$MAJREV.$MINREV`HERE=`pwd`#Delete the old onerm  ${HERE}/${TAR_NAME}  > /dev/null 2>&1 #Start at unh_iscsi/cd ../../if [  -d /tmp/$DIR_NAME  ] ; then	rm -rf /tmp/$DIR_NAME > /dev/null 2>&1 fimkdir  /tmp/$DIR_NAME > /dev/null 2>&1 cp -r unh-iscsi*/* /tmp/$DIR_NAME/cd /tmp#Exclude CVS dirs find $DIR_NAME -name "CVS*" -print > /tmp/$$tar -czf /tmp/${TAR_NAME} -X /tmp/$$ $DIR_NAMEmv  /tmp/${TAR_NAME}  ${HERE}/${TAR_NAME} echo "created ${HERE}/${TAR_NAME}"rm /tmp/$$

⌨️ 快捷键说明

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