cyg_scratch.sh

来自「用来分析Cygwin install软件包的脚本,可以生成thuder识别的Do」· Shell 代码 · 共 39 行

SH
39
字号
#! /bin/sh# This script. use to generate a download script. for cygwin !## Usage : ./cyg_scratch.sh setup.ini# Copy&Update&Refer http://blog.csdn.net/ArchSh/archive/2006/08/04/1019224.aspxDEFAULT_SETUP_INI="setup.ini"BASE_MIRROR_SITE="http://www.cygwin.cn/pub/"## If the setup.ini specified ?if [ -z $1 ] ; then   SETUP_INI=$DEFAULT_SETUP_INIelse   SETUP_INI=$1fi## If the SETUP_INI exists ?if [ ! -f $SETUP_INI ] ; then   echo "$SETUP_INI does not exists !"   exit 0fi## Scratch the package file names in the setup.ini# Here some improvement shuld be done:  The following statements has not ignored the old versions.....How to improve...setupIni=`gawk '/^install:|^source:/ {print $2}' $SETUP_INI`for fname in $setupIni;do 	#wget -P `dirname $fname` $BASE_MIRROR_SITE$fname	#echo "$BASE_MIRROR_SITE$fname"    # Http was missing.,,	echo "${BASE_MIRROR_SITE}${fname}" done   #for fname in $setupIni# do#    echo $BASE_MIRROR_SITE$fname## You can change to any statements to download the file you want.# `dirname $fname` : the directory prefix##done#wget -P `dirname $fname` $BASE_MIRROR_SITE$fname## END

⌨️ 快捷键说明

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