diff --git a/bin/sde-download2 b/bin/sde-download2 new file mode 100755 index 0000000..bc8c930 --- /dev/null +++ b/bin/sde-download2 @@ -0,0 +1,72 @@ +#!/bin/sh +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: bin/sde-download2 +# Copyright (C) 2007 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This program 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; version 2 of the License. A copy of the +# GNU General Public License can be found in the file COPYING. +# --- SDE-COPYRIGHT-NOTE-END --- + + +#Description: Download sources + +[ -n "$SDEROOT" ] || + export SDEROOT=$( cd "${0%/*}/.."; pwd -P ) + +. $SDEROOT/lib/libsde.in + +download_usage() { + local progname=${0##*/} + cat <&2 +Usage: $progname [DISCRIMINATOR] [OPTIONS] [ITEMS...] + +Accepted discriminators: + * config (cfg) + * package (pkg) - default + * repository (repo) + +For more information read \`sde help download\`. +EOT +} + +# detect discriminator +discriminator=package +if [ $# -gt 0 ]; then + case "$1" in + -*) ;; + config|cfg) + discriminator=config; shift ;; + package|pkg) + discriminator=package; shift ;; + repository|repo) + discriminator=repository: shift ;; + *) + echo_error "$1: invalid discriminator" + download_usage + exit -1 ;; + esac +fi + +shortopts='dqvm:' +longopts='dry-run,quiet,verbose,timeout:,check:,mirror:,mode:,dependencies' +options=$( getopt -o "$shortopts" -l "$longopts" -- "$@" ) + +if [ $? -ne 0 ]; then + download_usage + exit -1 +fi + +# load new arguments list +eval set -- "$options" + +dryrun= + +echo_abort 1 "$discriminator: Not yet implemented" + +set -e