|
|
@ -3,7 +3,7 @@ |
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
|
|
# |
|
|
|
# Filename: bin/sde-create-package |
|
|
|
# Copyright (C) 2008 The OpenSDE Project |
|
|
|
# Copyright (C) 2008 - 2009 The OpenSDE Project |
|
|
|
# |
|
|
|
# More information can be found in the files COPYING and README. |
|
|
|
# |
|
|
@ -24,22 +24,22 @@ |
|
|
|
. "$SDEROOT/lib/sde-package/hives.in" |
|
|
|
|
|
|
|
create_usage() { |
|
|
|
local progname=${0##*/} hive= |
|
|
|
local progname="$(echo "$0" | sed -e 's,.*/,,' -e 's,-, ,g')" hive= |
|
|
|
cat <<EOT |
|
|
|
Usage: ${progname//-/ } [--hive <hive>[:<index>]] [<repository>/][<package>] [hive arguments] |
|
|
|
Usage: $progname [--hive <hive>[:<index>]] [<repository>/][<package>] [hive arguments] |
|
|
|
|
|
|
|
Available Hives (--hivelist): |
|
|
|
EOT |
|
|
|
for hive in $( package_hives_list ); do |
|
|
|
desc=$( package_hive_desc "$hive" ) |
|
|
|
aliases=$( package_hive_aliases "$hive" ) |
|
|
|
aliases=$(package_hive_aliases "$hive" | tr ' ' ',') |
|
|
|
if [ "$hive" = 'download' ]; then |
|
|
|
default=yes |
|
|
|
else |
|
|
|
default= |
|
|
|
fi |
|
|
|
|
|
|
|
printf "%15s %s%s\n" "$hive" "${desc:-...}" "${aliases:+ (Alias: ${aliases// /,})}${default:+ (default)}" |
|
|
|
printf "%15s %s%s\n" "$hive" "${desc:-...}" "${aliases:+ (Alias: $aliases)}${default:+ (default)}" |
|
|
|
done |
|
|
|
} |
|
|
|
|
|
|
@ -109,7 +109,12 @@ fi |
|
|
|
|
|
|
|
# $repo/$pkg |
|
|
|
# |
|
|
|
pkg="$1"; shift |
|
|
|
if [ $# -gt 0 ]; then |
|
|
|
pkg="$1"; shift |
|
|
|
else |
|
|
|
pkg= |
|
|
|
fi |
|
|
|
|
|
|
|
if [ -z "$pkg" ]; then |
|
|
|
echo_error "no package name given." |
|
|
|
create_usage |
|
|
|