# HG changeset patch # User Heiko Schlittermann (ZARAFA.ctq.de) hs@schlittermann.de # Date 1302529048 -7200 # Node ID 8fe32b9da32653b472cec05175785300e015abb0 # Parent 888e1c15c9fd256e37ed238ea46a5e3c62b8cdf9 should work now. diff -r 888e1c15c9fd -r 8fe32b9da326 .hgignore --- a/.hgignore Mon Apr 11 13:09:31 2011 +0200 +++ b/.hgignore Mon Apr 11 15:37:28 2011 +0200 @@ -5,3 +5,4 @@ ftbackup.8 debian/files Makefile +.version diff -r 888e1c15c9fd -r 8fe32b9da326 Makefile.in --- a/Makefile.in Mon Apr 11 13:09:31 2011 +0200 +++ b/Makefile.in Mon Apr 11 15:37:28 2011 +0200 @@ -9,9 +9,10 @@ all: -install: man all +install: man .version all install -d -m 0755 ${DESTDIR}${sbindir} install -m 0755 ${SCRIPT} ${DESTDIR}${sbindir} + perl -i -pe 's/\/'`cat .version`'/' ${DESTDIR}${sbindir}/${SCRIPT} install -d -m 0755 ${DESTDIR}${man8dir} install -m 0644 ${MAN8PAGE} ${DESTDIR}${man8dir}/ @@ -21,10 +22,15 @@ man: ${MAN8PAGE} clean: - rm -f ${MAN8PAGE} + rm -f ${MAN8PAGE} .version distclean: clean rm -f Makefile +.version: + test -f .hg_archival.txt \ + && { grep ^node: | cut -f2 -d' ' >$@; } \ + || { hg id | cut -f1 -d' ' >$@; } + %.8: % pod2man --section 8 $< >$@ diff -r 888e1c15c9fd -r 8fe32b9da326 ftbackup --- a/ftbackup Mon Apr 11 13:09:31 2011 +0200 +++ b/ftbackup Mon Apr 11 15:37:28 2011 +0200 @@ -2,6 +2,7 @@ use strict; use warnings; +use 5.10.0; use IO::File; use File::Basename; use Net::FTP; @@ -12,16 +13,16 @@ use Pod::Usage; use POSIX qw(strftime); use English qw(-no_match_vars); -use 5.10.0; use if $ENV{DEBUG} => qw(Smart::Comments); $ENV{LC_ALL} = "C"; my $ME = basename $0; +my $VERSION = ''; -my @CONFIGS = ("/etc/$ME", "$ENV{HOME}/.$ME", "$ME.conf"); +my @CONFIGS = ("/etc/$ME.conf", "$ENV{HOME}/.$ME.conf", "$ME.conf"); -my $NODE = hostname; +my $HOSTNAME = hostname; my $NOW = time(); my $opt_level = undef; @@ -43,7 +44,7 @@ $SIG{INT} = sub { warn "Got signal INT\n"; exit 1 }; my %CONFIG = ( - FTP_DIR => "backup/