|
|
@ -1,59 +0,0 @@ |
|
|
|
#!/bin/sh |
|
|
|
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
|
|
# |
|
|
|
# Filename: bin/sde-package |
|
|
|
# Copyright (C) 2006 - 2008 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) |
|
|
|
|
|
|
|
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 ;; |
|
|
|
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 |