?? cyg_scratch.sh
字號:
#! /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
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -