[initramfs] Enhanced output format to run `ldconfig` if etc/ld.so.conf is present
[opensde-nopast.git] / bin / sde-list
blob03c6647872b31e66bf4c63a351bb9d882084a8ae
1 #!/bin/sh
2 # --- SDE-COPYRIGHT-NOTE-BEGIN ---
3 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
5 # Filename: bin/sde-list
6 # Copyright (C) 2007 The OpenSDE Project
8 # More information can be found in the files COPYING and README.
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; version 2 of the License. A copy of the
13 # GNU General Public License can be found in the file COPYING.
14 # --- SDE-COPYRIGHT-NOTE-END ---
16 #Description: generate lists needed by other commands
18 set -e
20 [ -n "$SDEROOT" ] ||
21 export SDEROOT=$( cd "${0%/*}/.."; pwd -P )
23 . $SDEROOT/lib/libsde.in
25 list_usage() {
26 cat <<EOT
27 Usage: sde list [DISCRIMINATOR] [OPTIONS]
29 Valid discrimintors are:
30 * package (pkg)
31 * download
33 Try \`sde help list\` for more details.
34 EOT
37 option=help
39 # discriminator
40 if [ $# -gt 0 ]; then
41 option="$1"; shift
44 # multiplex
45 case "$option" in
46 package|pkg) exec $SDEROOT/bin/sde-list-pkg "$@" ;;
47 download) exec $SDEROOT/bin/sde-list-download "$@" ;;
48 help) list_usage ;;
49 *) echo_error "Unknown discriminator '$option'."
50 list_usage
51 exit 1 ;;
52 esac