nutools/ulibsync

39 lines
935 B
Plaintext
Raw Normal View History

2013-08-27 15:14:44 +04:00
#!/bin/bash
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
2014-07-07 22:06:38 +04:00
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
urequire DEFAULTS
2013-08-27 15:14:44 +04:00
function display_help() {
uecho "$scriptname: Copier les librairies ulib et/ou pyulib
USAGE
$scriptname [options] destdir
OPTIONS
-u
Copier ulib
-p
Copier pyulib"
}
parse_opts "${PRETTYOPTS[@]}" \
--help '$exit_with display_help' \
-u,--ulib ulib \
-p,--pyulib pyulib \
@ args -- "$@" && set -- "${args[@]}" || die "$args"
[ -z "$ulib" -a -z "$pyulib" ] && ulib=1
destdir="${1:-.}"
if [ -n "$ulib" ]; then
if ask_yesno "Voulez-vous copier les librairies ulib dans $(ppath "$destdir")?" O; then
ulib_sync "$destdir"
fi
fi
if [ -n "$pyulib" ]; then
if ask_yesno "Voulez-vous copier les librairies pyulib dans $(ppath "$destdir")?" O; then
urequire nutools/pyulib
pyulib_sync "$destdir"
fi
fi