OpenSDE Framework (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

72 lines
2.2 KiB

#!/bin/sh
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: bin/sde-package
# Copyright (C) 2006 - 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 ---
#Alias: pkg
#Description: Package related tasks
set -e
[ -n "$SDEROOT" ] ||
export SDEROOT=$( cd "${0%/*}/.."; pwd -P )
. $SDEROOT/lib/libsde.in
. $SDEROOT/lib/sde-package.in
package_usage() {
cat <<EOT
Usage: sde package <action> <arguments> (Alias: pkg)
update [--location <url>] [<package>] [<version>] (Alias: up)
Updates a package (which is autodetected if you are on it) to a
given version, or simply download and regenerate checksums.
Using --location you are able to specify which will be the new
download location for this update.
update [--no-location] --md5 <url> (Alias: up)
Updates a set of packages based on a remote .md5 file
Using --no-location you tell the tool to not assume the download
location of the md5 file for the updates but keep their individual
download locations.
new [<repository>/]<package> <download> [...]
Creates a new package based on a template and the given download
locations.
new -fm [<repository>/]<package> [<name_at_freshmeat>]
Creates a new package based on the information available at
freshmeat <http://freshmeat.net> from it.
new -deb [options] [repo/]<package>
Creates a pkg from packages.debian.org. For more details:
sde pkg new -deb --help
EOT
}
# what action was requested?
if [ $# -eq 0 ]; then
action="help"
else
action="$1"; shift
fi
case "$action" in
help|--help) package_usage ;;
up|update) . $SDEROOT/lib/sde-package/update.in
package_update "$@" ;;
new) . $SDEROOT/lib/sde-package/new.in
package_new "$@" ;;
*) echo_warning "'$COLOR_MESSAGE$action$COLOR_NORMAL' not understood by the" \
"$COLOR_MESSAGE$module$COLOR_NORMAL module"
package_usage
exit 1 ;;
esac