|
|
|
@ -2,8 +2,8 @@ |
|
|
|
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
|
|
# |
|
|
|
# Filename: scripts/Download |
|
|
|
# Copyright (C) 2006 The OpenSDE Project |
|
|
|
# Filename: bin/sde-download |
|
|
|
# Copyright (C) 2006 - 2007 The OpenSDE Project |
|
|
|
# Copyright (C) 2004 - 2006 The T2 SDE Project |
|
|
|
# Copyright (C) 1998 - 2003 Clifford Wolf |
|
|
|
# |
|
|
|
@ -14,49 +14,22 @@ |
|
|
|
# the Free Software Foundation; version 2 of the License. A copy of the |
|
|
|
# GNU General Public License can be found in the file COPYING. |
|
|
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
# |
|
|
|
# Run this command from the OpenSDE root directory as |
|
|
|
# ./scripts/Download [ options ] |
|
|
|
# |
|
|
|
# It enables you to download source files as described in the package |
|
|
|
# definitions (optionally using a mirroring 'cache' server). |
|
|
|
# |
|
|
|
# This script also allows for checksum display/validation. |
|
|
|
|
|
|
|
umask 022 |
|
|
|
#Description: Download sources |
|
|
|
#Alias: get |
|
|
|
|
|
|
|
. lib/functions.in |
|
|
|
set -e |
|
|
|
|
|
|
|
[ -n "$SDEROOT" ] || |
|
|
|
export SDEROOT=$( cd "${0%/*}/.."; pwd -P ) |
|
|
|
|
|
|
|
SDEROOT=$PWD |
|
|
|
. $SDEROOT/lib/libsde.in |
|
|
|
. $SDEROOT/lib/libsde-ini.in # to write |
|
|
|
. $SDEROOT/lib/functions.in |
|
|
|
|
|
|
|
if [ "$1" = '--help' ] ; then |
|
|
|
{ echo |
|
|
|
echo "Usage:" |
|
|
|
echo |
|
|
|
echo " ./scripts/Download [options] [ Package(s) ]" |
|
|
|
echo " ./scripts/Download [options] [ Desc file(s) ]" |
|
|
|
echo " ./scripts/Download [options] -repository Repositories" |
|
|
|
echo " ./scripts/Download [options] { -all | -required }" |
|
|
|
echo |
|
|
|
echo " Where [options] is an alias for:" |
|
|
|
echo " [ -cfg <config> ] [ -nock ] [ -alt-dir <AlternativeDirectory> ]" |
|
|
|
echo " [ -mirror <URL> | -check ] [ -try-questionable ] [ -notimeout ]" |
|
|
|
echo " [ -longtimeout ] [ -curl-opt <curl-option>[:<curl-option>[:..]] ]" |
|
|
|
echo " [ -copy ] [ -move ]" |
|
|
|
echo |
|
|
|
echo " On default, this script auto-detects the best OpenSDE mirror." |
|
|
|
echo |
|
|
|
echo " Mirrors can also be a local directories in the form of 'file:///<dir>'." |
|
|
|
echo |
|
|
|
echo " ./scripts/Download -mk-cksum Filename(s)" |
|
|
|
echo " ./scripts/Download [ -list | -list-unknown | -list-missing | -list-cksums ]" |
|
|
|
echo |
|
|
|
echo "See '-mirror none' output for help on bypassing the official mirrors." |
|
|
|
echo ; } >&2 |
|
|
|
exit 1 |
|
|
|
fi |
|
|
|
umask 022 |
|
|
|
|
|
|
|
cd "$SDEROOT" |
|
|
|
|
|
|
|
# -mk-cksum mode (display OpenSDE type package checksum): it |
|
|
|
# displays the checksum OpenSDE validates against. |