Permalink
Browse files

Add standard Free Software files, migrate to the GNU GPL 3.

  • Loading branch information...
1 parent 800ef7a commit 9665f149f761b8dc062d432a0a19feb783712670 @rosslagerwall committed Jun 25, 2011
Showing with 822 additions and 0 deletions.
  1. +1 −0 AUTHORS
  2. +674 −0 COPYING
  3. +57 −0 ChangeLog
  4. +1 −0 INSTALL
  5. 0 NEWS
  6. +55 −0 README
  7. +17 −0 src/backuprotator/BackupRotator.java
  8. +17 −0 src/backuprotator/Settings.java
View
@@ -0,0 +1 @@
+Ross Lagerwall <rosslagerwall@gmail.com
View
674 COPYING

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,57 @@
+changeset: 6:a929035daa8d
+tag: tip
+user: Ross Lagerwall <rosslagerwall@gmail.com>
+date: Mon May 30 09:04:33 2011 +0200
+files: build.xml
+description:
+Migrate to ant build system.
+
+
+changeset: 5:6bd6fb53c626
+user: Ross Lagerwall <rosslagerwall@gmail.com>
+date: Sun May 15 18:31:41 2011 +0200
+files: src/backuprotator/BackupRotator.java
+description:
+Document program.
+
+
+changeset: 4:5815d112fd54
+user: Ross Lagerwall <rosslagerwall@gmail.com>
+date: Sun May 15 16:05:54 2011 +0200
+files: src/backuprotator/BackupRotator.java
+description:
+Display a help message if the cmdline arguments are incorrect.
+
+
+changeset: 3:0e7de04c5348
+user: Ross Lagerwall <rosslagerwall@gmail.com>
+date: Sun May 15 15:57:47 2011 +0200
+files: src/backuprotator/BackupRotator.java src/backuprotator/Settings.java
+description:
+Don't hardcode config file path, accept it as cmdline argument.
+
+
+changeset: 2:72487dabf2f1
+user: Ross Lagerwall <rosslagerwall@gmail.com>
+date: Sun May 15 15:55:10 2011 +0200
+files: src/backuprotator/Settings.java
+description:
+Document the configuration file format.
+
+
+changeset: 1:aea060f72c1a
+user: Ross Lagerwall <rosslagerwall@gmail.com>
+date: Sun May 15 14:45:43 2011 +0200
+files: src/backuprotator/Settings.java
+description:
+Use generic instead of unsafe ArrayList.
+
+
+changeset: 0:4751f7358012
+user: Ross Lagerwall <rosslagerwall@gmail.com>
+date: Tue May 03 20:59:07 2011 +0200
+files: .hgignore settings.conf src/backuprotator/BackupRotator.java src/backuprotator/Settings.java
+description:
+Initial commit.
+
+
View
@@ -0,0 +1 @@
+BackupRotator does not need to be installed.
View
0 NEWS
No changes.
View
55 README
@@ -0,0 +1,55 @@
+BackupRotator
+=============
+
+BackupRotator is a program that allows files to be "rotated" with an upper
+limit on the number of files that exist.
+Basically, it is given a filename(s) and a number n in a configuration file
+and it renames the filename(s) such that there it forms an increasing
+list filename1, filename2, up to the smaller of n or as many as are
+available. If there are more than n files when the program is run, the
+oldest files get deleted.
+Eg: If there are files called log1, log2, log3 and maxNo=3, running the
+program will delete log3, rename log2 to log3 and rename log1 to log2.
+Eg: If there are files called log1, log2, log3 and maxNo=0, running the
+program will rename log2 to log3 and rename log1 to log2.
+Eg: If there is a file called log1 and maxNo=3, running the program will
+delete log3, rename log1 to log2.
+Eg: If there are files called log1, log2 and maxNo=3, running the
+program will rename log2 to log3 and rename log1 to log2.
+
+The config file format is as follows:
+ A line starting with "backupPath=" defines the path to the directory
+ containing the files to be rotated.
+ A line starting with "maxNo=" defines the maximum number of files that
+ may exist at any one time.
+ A line starting with "filename=" defines the generic name of the file to be
+ rotated relative to backupPath. A # indicates the position where the file
+ will be numbered. Eg: filename=myfile# will result files being called
+ myfile1, myfile2, etc. There may be more than one "filename=" line. The
+ rotation will be applied to all filenames.
+
+To build:
+ ant
+
+To build a jar file:
+ ant jar
+
+Usage:
+ java -jar BackupRotator.jar [-h] [--help] [configfile]
+
+License:
+
+ Copyright (C) 2011 Ross Lagerwall <rosslagerwall@gmail.com>
+
+ 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 3 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, see <http://www.gnu.org/licenses/>.
@@ -1,3 +1,20 @@
+/*
+ Copyright (C) 2011 Ross Lagerwall <rosslagerwall@gmail.com>
+
+ 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 3 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, see <http://www.gnu.org/licenses/>.
+*/
+
package backuprotator;
import java.io.*;
@@ -1,3 +1,20 @@
+/*
+ Copyright (C) 2011 Ross Lagerwall <rosslagerwall@gmail.com>
+
+ 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 3 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, see <http://www.gnu.org/licenses/>.
+*/
+
package backuprotator;
import java.io.*;

0 comments on commit 9665f14

Please sign in to comment.