nutools/ulibsync

39 lines
935 B
Bash
Executable File

#!/bin/bash
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
urequire DEFAULTS
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