48 lines
964 B
Plaintext
48 lines
964 B
Plaintext
|
#!/bin/bash
|
||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||
|
|
||
|
function display_help() {
|
||
|
uecho "$scriptname: Afficher les préfixes valides pour uinst
|
||
|
|
||
|
USAGE
|
||
|
$scriptname -l|--dump|prefix...
|
||
|
|
||
|
OPTIONS
|
||
|
-l
|
||
|
Afficher la liste des préfixes valides
|
||
|
--dump
|
||
|
Afficher la liste des préfixes valides et leurs valeurs
|
||
|
prefix
|
||
|
Afficher la valeur du préfixe spécifié"
|
||
|
}
|
||
|
|
||
|
source "$(dirname "$0")/ulib/ulib" &&
|
||
|
urequire DEFAULTS PREFIXES-DEFAULTS ||
|
||
|
exit 1
|
||
|
|
||
|
action=expand
|
||
|
parse_opts "${PRETTYOPTS[@]}" \
|
||
|
--help '$exit_with display_help' \
|
||
|
-l action=list \
|
||
|
--dump action=dump \
|
||
|
@ args -- "$@" && set -- "${args[@]}" || die "$args"
|
||
|
|
||
|
compute_java_prefixes
|
||
|
compute_webobjects_prefixes
|
||
|
compute_apache_prefixes
|
||
|
compute_ldap_prefixes
|
||
|
|
||
|
case "$action" in
|
||
|
expand)
|
||
|
for prefix in "$@"; do
|
||
|
expand_prefix "$prefix"
|
||
|
done
|
||
|
;;
|
||
|
list)
|
||
|
list_prefixes
|
||
|
;;
|
||
|
dump)
|
||
|
dump_prefixes
|
||
|
;;
|
||
|
esac
|