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:
parent
324ff1d0aa
commit
110c339832
8
fhem/contrib/FB7390/cleanAVMperl
Normal file
8
fhem/contrib/FB7390/cleanAVMperl
Normal 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
|
@ -9,8 +9,10 @@ sleep 1
|
|||||||
|
|
||||||
echo "########################### Extracting fhem.tar.gz ###################"
|
echo "########################### Extracting fhem.tar.gz ###################"
|
||||||
cd $root
|
cd $root
|
||||||
|
|
||||||
if test -d fhem; then
|
if test -d fhem; then
|
||||||
mv fhem fhem.OLD
|
odir=fhem.old.`date +%Y-%m-%d_%H:%M:%S`
|
||||||
|
mv fhem $odir
|
||||||
fi
|
fi
|
||||||
|
|
||||||
gzip -cd /var/fhem.tar.gz | tar xf -
|
gzip -cd /var/fhem.tar.gz | tar xf -
|
||||||
@ -18,35 +20,29 @@ gzip -cd /var/fhem.tar.gz | tar xf -
|
|||||||
cd $root
|
cd $root
|
||||||
|
|
||||||
# Save files from the AVM Style installation
|
# 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 ###########"
|
echo "########################### Converting chroot style config ###########"
|
||||||
export LD_LIBRARY_PATH=$home/lib
|
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
|
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
|
cp $odir/etc/fhem.cfg fhem
|
||||||
fhem/perl -pi -e 's,/opt,$root,g;
|
fhem/perl -pi -e 's,/usr/share/fhem,'$home',g;
|
||||||
s,fhem/share,fhem,;
|
s,/var/log/fhem,'$home'/log,;
|
||||||
s,^#define autocreate,define autocreate,;
|
s,^#define autocreate,define autocreate,;
|
||||||
s,^#attr autocreate,attr autocreate,;
|
s,^#attr autocreate,attr autocreate,;
|
||||||
s,ttyACM(.)(@\d+)?,ttyACM$1\@38400,;' fhem/fhem.cfg
|
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
|
fi
|
||||||
|
|
||||||
# Save files from our old version
|
# Save files from our old version
|
||||||
if test -f fhem.OLD/fhem.cfg; then
|
if test -f $odir/fhem.cfg; then
|
||||||
echo "########################### Copying non-chroot style config ##########"
|
mv $odir/FHEM/*.sh fhem/FHEM
|
||||||
mv fhem.OLD/FHEM/*.sh fhem/FHEM
|
mv $odir/FHEM/99.*Util.pm fhem/FHEM
|
||||||
mv fhem.OLD/FHEM/99.*Util.pm fhem/FHEM
|
mv $odir/FHEM/*.sh fhem/FHEM
|
||||||
mv fhem.OLD/FHEM/*.sh fhem/FHEM
|
mv $odir/log/* fhem/log
|
||||||
mv fhem.OLD/log/* fhem/log
|
mv $odir/*.cfg fhem
|
||||||
mv fhem.OLD/fhem.cfg fhem
|
|
||||||
fi
|
fi
|
||||||
chown -R boxusr80:root $home
|
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
|
cat /var/flash/debug.cfg > /var/nvi.tmp
|
||||||
grep -q fhem /var/nvi.tmp
|
grep -q fhem /var/nvi.tmp
|
||||||
r=$?
|
r=$?
|
||||||
|
@ -40,6 +40,7 @@ my @filelist = (
|
|||||||
"docs/fhem.*.png",
|
"docs/fhem.*.png",
|
||||||
"docs/.*.jpg",
|
"docs/.*.jpg",
|
||||||
"../culfw/Devices/CUL/.*.hex",
|
"../culfw/Devices/CUL/.*.hex",
|
||||||
|
"./CHANGED",
|
||||||
);
|
);
|
||||||
|
|
||||||
# Read in the file timestamps
|
# Read in the file timestamps
|
||||||
@ -49,6 +50,7 @@ my %filedir;
|
|||||||
foreach my $fspec (@filelist) {
|
foreach my $fspec (@filelist) {
|
||||||
$fspec =~ m,^(.+)/([^/]+)$,;
|
$fspec =~ m,^(.+)/([^/]+)$,;
|
||||||
my ($dir,$pattern) = ($1, $2);
|
my ($dir,$pattern) = ($1, $2);
|
||||||
|
|
||||||
opendir DH, $dir || die("Can't open $dir: $!\n");
|
opendir DH, $dir || die("Can't open $dir: $!\n");
|
||||||
foreach my $file (grep { /$pattern/ && -f "$dir/$_" } readdir(DH)) {
|
foreach my $file (grep { /$pattern/ && -f "$dir/$_" } readdir(DH)) {
|
||||||
my @st = stat("$dir/$file");
|
my @st = stat("$dir/$file");
|
||||||
@ -110,8 +112,10 @@ system("mkdir -p $uploaddir2");
|
|||||||
|
|
||||||
my %filelist2 = (
|
my %filelist2 = (
|
||||||
"./fhem.pl.txt" => ".",
|
"./fhem.pl.txt" => ".",
|
||||||
|
"./CHANGED" => ".",
|
||||||
"FHEM/.*.pm" => "FHEM",
|
"FHEM/.*.pm" => "FHEM",
|
||||||
"../culfw/Devices/CUL/.*.hex" => "FHEM",
|
"../culfw/Devices/CUL/.*.hex" => "FHEM",
|
||||||
|
"webfrontend/pgm2/.*.pm\$" => "FHEM",
|
||||||
"webfrontend/pgm2/.*" => "www/pgm2",
|
"webfrontend/pgm2/.*" => "www/pgm2",
|
||||||
"docs/commandref.html" => "www/pgm2",
|
"docs/commandref.html" => "www/pgm2",
|
||||||
"docs/faq.html" => "www/pgm2",
|
"docs/faq.html" => "www/pgm2",
|
||||||
@ -120,6 +124,11 @@ my %filelist2 = (
|
|||||||
"docs/.*.jpg" => "www/pgm2",
|
"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
|
# Read in the file timestamps
|
||||||
my %filetime2;
|
my %filetime2;
|
||||||
my %filesize2;
|
my %filesize2;
|
||||||
@ -131,6 +140,7 @@ foreach my $fspec (keys %filelist2) {
|
|||||||
my $tdir = $filelist2{$fspec};
|
my $tdir = $filelist2{$fspec};
|
||||||
opendir DH, $dir || die("Can't open $dir: $!\n");
|
opendir DH, $dir || die("Can't open $dir: $!\n");
|
||||||
foreach my $file (grep { /$pattern/ && -f "$dir/$_" } readdir(DH)) {
|
foreach my $file (grep { /$pattern/ && -f "$dir/$_" } readdir(DH)) {
|
||||||
|
next if($skiplist2{$tdir} && $file =~ m/$skiplist2{$tdir}/);
|
||||||
my @st = stat("$dir/$file");
|
my @st = stat("$dir/$file");
|
||||||
my @mt = localtime($st[9]);
|
my @mt = localtime($st[9]);
|
||||||
$filetime2{"$tdir/$file"} = sprintf "%04d-%02d-%02d_%02d:%02d:%02d",
|
$filetime2{"$tdir/$file"} = sprintf "%04d-%02d-%02d_%02d:%02d:%02d",
|
||||||
|
Loading…
Reference in New Issue
Block a user