?? install_setup.sh
字號:
#! /bin/sh# usage# Install_setup.sh fileLsitName Download_Dir# fileListName: The file saving the package names.# Download_dir: The dir for saving downloaded packages, this pacakge is set when you download them by thunder.. # Copyright (C) # This script is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2, or (at your option)# any later version.# This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU General Public License for more details.# You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA# 02110-1301, USA.# As a special exception to the GNU General Public License, if you# distribute this file as part of a program that contains a# configuration script generated by Autoconf, you may include it under# the same distribution terms that you use for the rest of that program.# The first version is from http://hi.baidu.com/yoshubom/blog/item/99a85baf9339e3f8fbed5087.html# Author shijie_xu@163.comecho "The list file is $1"echo "Download directory: $2"TMP=tmp.lst# You have to re-define this path according to your environmentINSTALL_PATH=$3# The record in fileLsitName like http://www.cygwin.cn/pub/release/ELFIO/ELFIO-1.0.0-1-src.tar.bz2if [ ! -f $1 ] ; then echo "package list file:$1 does not exists !" exit 0fi# You have to replace the http://www.cygwin.cn/pub with http://..or ftp://,,, , This is determined by what mirror you have selected in your setup,exe,gawk '{ gsub(/http:\/\/www.cygwin.cn\/pub\//,""); print }' $1 > $TMPDOWNLOAD_DIR=$2FILELIST=`cat $TMP`for thefile in $FILELISTdo #PACKAGE_DIR: The dir required by local install.. PACKAGE_DIR="${INSTALL_PATH}/"`dirname $thefile` # To save the mv cost.. if [ ! -f "${INSTALL_PATH}/${thefile}" ] ; then mkdir -p $PACKAGE_DIR mv $DOWNLOAD_DIR"/"`basename $thefile` $PACKAGE_DIR fidoneunlink $TMP
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -