mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-10-25 15:58:24 -04:00
Imported missing files from master to feature-h264-videostorage
This commit is contained in:
1 parent
d4654f63ae
commit
df3ab025f8
1530 files changed
+350837
No files matched your search
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder PHP Retagging Script, $Date$, $Revision$
|
||||
# Copyright (C) 2003, 2004, 2005, 2006 Philip Coombes
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# Short shell script for changing short open tags to long ones.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
perl swap.pl '<\?=' '<?php echo' *.php
|
||||
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/perl -w
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# ZoneMinder Find and Replace Utility, $Date$, $Revision$
|
||||
# Copyright (C) 2003, 2004, 2005, 2006 Philip Coombes
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
# General purpose find and replace utility.
|
||||
#
|
||||
# ==========================================================================
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
$| = 1;
|
||||
|
||||
exit if ( @ARGV < 3 );
|
||||
my $from = shift @ARGV;
|
||||
my $to = shift @ARGV;
|
||||
foreach my $file ( @ARGV )
|
||||
{
|
||||
my $tmpfile = "${file}.tmp.swap";
|
||||
open( FROMFILE, $file ) or die( "Can't open '$file' for reading" );
|
||||
open( TOFILE, ">${tmpfile}" ) or die( "Can't open '$tmpfile' for writing" );
|
||||
my $count = 0;
|
||||
while( <FROMFILE> )
|
||||
{
|
||||
$count += s/$from/$to/g;
|
||||
print( TOFILE );
|
||||
}
|
||||
close( FROMFILE );
|
||||
close( TOFILE );
|
||||
if ( $count )
|
||||
{
|
||||
rename( $tmpfile, $file ) or die( "Can't rename '$tmpfile' to '$file'" );
|
||||
}
|
||||
else
|
||||
{
|
||||
unlink( $tmpfile ) or die( "Can'delete rename '$tmpfile' to '$file'" );
|
||||
}
|
||||
if ( $count )
|
||||
{
|
||||
print( "Processed $file" );
|
||||
print( ": $count changes" );
|
||||
print( "\n" );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user