@@ -25,6 +25,33 @@ Requirements
2525Both `flac` and `metaflac` need to be in your $PATH. These programs
2626are normally packaged together as “flac” by distributions.
2727
28+ The script both depends on Bash and GNU features of other core
29+ utilities. Versions of `mv` , `getopt` , `sync` , etc from other sources
30+ (such as the *BSD operating systems) might work, but require
31+ compatibility with the same switches found in the GNU versions.
32+
33+ reflac has only been developed on tested on GNU+Linux, but should work
34+ on any other operating system with the appropriate tools.
35+
36+ Safety
37+ ------
38+
39+ By default, reflac performs a sync on files after two points of its
40+ process: after moving the recompressed file from the temporary
41+ directory to the original location, and after renaming the file from
42+ “* .new” to the original name. This should provide safety in the case
43+ of system crashes or processes being killed.
44+
45+ Assuming file system syncs have not been disabled, one of two
46+ scenarios should arise in the worst case:
47+
48+ 1. No new files appear in the directory. A complete FLAC file may
49+ or may not still be available in a temporary staging directory under
50+ /tmp.
51+ 2. There exists an additional “*.new” file in the directory being
52+ processed, which may or may not be a complete FLAC file, the status
53+ of which can be tested with `flac -t`.
54+
2855Running
2956-------
3057
@@ -39,6 +66,8 @@ Usage: reflac [OPTION]... [--] DIRECTORY...
3966 -r --recursive Recurse into directories.
4067 -n --no-action Do not recompress. With --verbose, displays a list of
4168 files that would be processed.
69+ -s --no-sync Do not synchronize file data. Will return faster, with
70+ the potential danger to lose your files in a system crash.
4271 -0 --fast Use the fastest, but worst, compression possible.
4372 -1..-7 Adjust FLAC compresion between these standard ranges.
4473 The default is -5, the same as for flac itself.
5382----
5483
5584What, bugs? This program is flawless! Joking aside, although the
56- author tries to resolve in ` reflac` itself, it is at the mercy of bugs
85+ author tries to resolve in reflac itself, it is at the mercy of bugs
5786and limitations from flac and metaflac.
5887
5988Tag preservation in the light of malformed tags simply does not exist.
@@ -67,7 +96,7 @@ $ reflac FLAC
6796 field contains no '=' character
6897....
6998
70- ` reflac` will not continue after the error, resulting in the
99+ reflac will not continue after the error, resulting in the
71100untagged-but-recompressed file remaining in the temporary directory,
72101the path of which should be part of the error message as in the
73102example. The original file will not have been overwritten,
0 commit comments