2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

Forgotten changes...

git-svn-id: https://svn.fhem.de/fhem/trunk@1600 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2012-06-03 15:19:01 +00:00
parent 324ff1d0aa
commit 110c339832
3 changed files with 32 additions and 18 deletions

View File

@ -0,0 +1,8 @@
rm -rf 5.12.2/unicore
rm -rf 5.12.2/Pod
rm -rf 5.12.2/CPAN*
rm -rf 5.12.2/perl5db.pl
rm -rf 5.12.2/mips-linux/Config.pod
rm -rf 5.12.2/mips-linux/CORE
rm -rf 5.12.2/mips-linux/auto/Encode/{CN,JP,KR,TW}
find . -name \*.pod | xargs rm

View File

@ -9,8 +9,10 @@ sleep 1
echo "########################### Extracting fhem.tar.gz ###################"
cd $root
if test -d fhem; then
mv fhem fhem.OLD
odir=fhem.old.`date +%Y-%m-%d_%H:%M:%S`
mv fhem $odir
fi
gzip -cd /var/fhem.tar.gz | tar xf -
@ -18,35 +20,29 @@ gzip -cd /var/fhem.tar.gz | tar xf -
cd $root
# Save files from the AVM Style installation
if test -f fhem.OLD/opt/etc/fhem.cfg; then
if test -f $odir/etc/fhem.cfg; then
echo "########################### Converting chroot style config ###########"
export LD_LIBRARY_PATH=$home/lib
export PERL5LIB=$home/lib/perl5/site_perl/5.12.2/mips-linux:$home/lib/perl5/site_perl/5.12.2:$home/lib/perl5/5.12.2/mips-linux:$home/lib/perl5/5.12.2
cp fhem.OLD/opt/etc/fhem.cfg fhem
fhem/perl -pi -e 's,/opt,$root,g;
s,fhem/share,fhem,;
cp $odir/etc/fhem.cfg fhem
fhem/perl -pi -e 's,/usr/share/fhem,'$home',g;
s,/var/log/fhem,'$home'/log,;
s,^#define autocreate,define autocreate,;
s,^#attr autocreate,attr autocreate,;
s,ttyACM(.)(@\d+)?,ttyACM$1\@38400,;' fhem/fhem.cfg
mv fhem.OLD/opt/fhem/log/* fhem/log
mv $odir/var/log/fhem/* fhem/log
fi
# Save files from our old version
if test -f fhem.OLD/fhem.cfg; then
echo "########################### Copying non-chroot style config ##########"
mv fhem.OLD/FHEM/*.sh fhem/FHEM
mv fhem.OLD/FHEM/99.*Util.pm fhem/FHEM
mv fhem.OLD/FHEM/*.sh fhem/FHEM
mv fhem.OLD/log/* fhem/log
mv fhem.OLD/fhem.cfg fhem
if test -f $odir/fhem.cfg; then
mv $odir/FHEM/*.sh fhem/FHEM
mv $odir/FHEM/99.*Util.pm fhem/FHEM
mv $odir/FHEM/*.sh fhem/FHEM
mv $odir/log/* fhem/log
mv $odir/*.cfg fhem
fi
chown -R boxusr80:root $home
if test -d fhem.OLD; then
echo "########################### Deleting the old directory ###############"
rm -rf fhem.OLD
fi
cat /var/flash/debug.cfg > /var/nvi.tmp
grep -q fhem /var/nvi.tmp
r=$?

View File

@ -40,6 +40,7 @@ my @filelist = (
"docs/fhem.*.png",
"docs/.*.jpg",
"../culfw/Devices/CUL/.*.hex",
"./CHANGED",
);
# Read in the file timestamps
@ -49,6 +50,7 @@ my %filedir;
foreach my $fspec (@filelist) {
$fspec =~ m,^(.+)/([^/]+)$,;
my ($dir,$pattern) = ($1, $2);
opendir DH, $dir || die("Can't open $dir: $!\n");
foreach my $file (grep { /$pattern/ && -f "$dir/$_" } readdir(DH)) {
my @st = stat("$dir/$file");
@ -110,8 +112,10 @@ system("mkdir -p $uploaddir2");
my %filelist2 = (
"./fhem.pl.txt" => ".",
"./CHANGED" => ".",
"FHEM/.*.pm" => "FHEM",
"../culfw/Devices/CUL/.*.hex" => "FHEM",
"webfrontend/pgm2/.*.pm\$" => "FHEM",
"webfrontend/pgm2/.*" => "www/pgm2",
"docs/commandref.html" => "www/pgm2",
"docs/faq.html" => "www/pgm2",
@ -120,6 +124,11 @@ my %filelist2 = (
"docs/.*.jpg" => "www/pgm2",
);
# Can't make negative regexp to work, so do it with extra logic
my %skiplist2 = (
"www/pgm2" => ".pm\$",
);
# Read in the file timestamps
my %filetime2;
my %filesize2;
@ -131,6 +140,7 @@ foreach my $fspec (keys %filelist2) {
my $tdir = $filelist2{$fspec};
opendir DH, $dir || die("Can't open $dir: $!\n");
foreach my $file (grep { /$pattern/ && -f "$dir/$_" } readdir(DH)) {
next if($skiplist2{$tdir} && $file =~ m/$skiplist2{$tdir}/);
my @st = stat("$dir/$file");
my @mt = localtime($st[9]);
$filetime2{"$tdir/$file"} = sprintf "%04d-%02d-%02d_%02d:%02d:%02d",