76f587e57f4642d7a92d9b95424013b5e871d5b4
3 # ============================================================================
4 # Copyright (C) THALES. All rights reserved
5 # Author: Laurent Mazet
7 # ============================================================================
12 PROGNAME
=$
(basename $0)
15 EXCLUDE
=/tmp
/$PROGNAME-exclude-$$
17 TMPLOG
=/tmp
/$PROGNAME-$$.log
23 echo "usage: $PROGNAME [-h] [-v]"
24 echo " -h: help message"
25 echo " -v: version message"
31 function title
() { echo -e "\033[0;1m$*\033[0;0m"; }
32 function pass
() { echo -e "\033[1;32m$*\033[0;0m"; }
33 function warn
() { echo -e "\033[1;33m$*\033[0;0m"; }
34 function fail
() { echo -e "\033[1;31m$*\033[0;0m"; }
39 { eval $@
; } >&$TMPLOG && pass OK ||
{ fail KO
; cat $TMPLOG; ERR
=yes; }
46 while [ $# -gt 0 ]; do
49 -v) echo "$PROGNAME: version $VER"; exit;;
50 *) echo "unknown argument ($1)"; exit 1;;
56 cat - <<EOF > $EXCLUDE
65 for target
in $BLADES; do
66 tarball
=$TFTP/$target.tgz
67 repository
=$CLUSTER/$target
68 [ -d "$repository" ] ||
{ warn
"directory '$repository' does not exist"; continue; }
69 [ -f $tarball ] && check
rm -f $tarball
71 check
tar czf
$tarball --exclude-from $EXCLUDE .