diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-09-06 03:04:34 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-09-06 03:04:34 +0000 |
commit | 6bbd302a4024e25030b3835bc7fe435e48b3f1a9 (patch) | |
tree | 46d4015634f9bc2161d2a697d1de44972f9b7c58 /SL2LS.pl | |
parent | 5e0942c40e9f18d6b0496afcc00939b71af967a6 (diff) |
Completed a basic SL2LS.pl
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@30 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'SL2LS.pl')
-rwxr-xr-x | SL2LS.pl | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -10,6 +10,28 @@ while ($line = <SL>){ print LS $line; } -unlink sql-ledger.conf; +unlink "sql-ledger.conf"; +unlink "setup.pl"; #TODO: Move/Delete the SL directory + +&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; +} |