summaryrefslogtreecommitdiff
path: root/SL2LS.pl
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-26 18:00:56 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-26 18:00:56 +0000
commit666fd833584fe2e3618a397fe9d9a9bdf4c5b94b (patch)
tree19c4444705fd7f7803e0d7b597659c11d7e85b73 /SL2LS.pl
parent2edd2e4de0f08a0a5f23647ea715f279671a0b89 (diff)
Doing a simple Perltidy commit so that I can evaluate differences between the branches and make sure patches are up to date
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1103 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'SL2LS.pl')
-rwxr-xr-xSL2LS.pl52
1 files changed, 27 insertions, 25 deletions
diff --git a/SL2LS.pl b/SL2LS.pl
index 3a92b88a..3a04c334 100755
--- a/SL2LS.pl
+++ b/SL2LS.pl
@@ -5,16 +5,17 @@
# Simple script. Right now, all that needs to be done is that the SL directory
# needs to be deleted and the sql-ledger.conf needs to be renamed.
-$filedie = "To install manually:\n" .
- " Rename the sql-ledger.conf to ledger-smb.conf\n".
- " Delete the SL directory (optional but HIGHLY recommended)\n";
-open (SL, "< sql-ledger.conf") || die (
- "Could not open sql-ledger.conf: $! \n\n $filedie");
-open (LS, "> ledger-smb.conf") || die (
- "Could not open ledger-smb.conf: $! \n $filedie");
+$filedie =
+ "To install manually:\n"
+ . " Rename the sql-ledger.conf to ledger-smb.conf\n"
+ . " Delete the SL directory (optional but HIGHLY recommended)\n";
+open( SL, "< sql-ledger.conf" )
+ || die("Could not open sql-ledger.conf: $! \n\n $filedie");
+open( LS, "> ledger-smb.conf" )
+ || die("Could not open ledger-smb.conf: $! \n $filedie");
-while ($line = <SL>){
- print LS $line;
+while ( $line = <SL> ) {
+ print LS $line;
}
unlink "sql-ledger.conf";
@@ -24,20 +25,21 @@ unlink "sql-ledger.conf";
&recursive_unlink("SL");
sub recursive_unlink {
- ($dir) = shift @_;
- print "Recursively deleting $dir\n";
- opendir (DIR, $dir);
- while ($file = readdir DIR){
- if ($file !~ /^\.+$/){
- $file = "$dir/$file";
- if (-f $file){
- unlink $file;
- } elsif (-d $file){
- &recursive_unlink("$file");
- }
- }
- }
- closedir(DIR);
- print "Removing $dir\n";
- rmdir $dir;
+ ($dir) = shift @_;
+ print "Recursively deleting $dir\n";
+ opendir( DIR, $dir );
+ while ( $file = readdir DIR ) {
+ if ( $file !~ /^\.+$/ ) {
+ $file = "$dir/$file";
+ if ( -f $file ) {
+ unlink $file;
+ }
+ elsif ( -d $file ) {
+ &recursive_unlink("$file");
+ }
+ }
+ }
+ closedir(DIR);
+ print "Removing $dir\n";
+ rmdir $dir;
}