Skip to content

Commit a37af83

Browse files
committed
Remove the --preserve flag
flac always uses the input file’s modtime whenever possible, making this flag no longer needed.
1 parent 4724964 commit a37af83

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

reflac

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ RECURSIVE=0
99
NOACTION=0
1010
SYNC=1
1111
FLAC_LEVEL=5 # Default FLAC compression level
12-
PRESERVE_MODTIME="" # for -p|--preserve
1312

1413
SELF="$(readlink -f "$0")"
15-
OPTS=$(getopt -o 012345678hnprsvV \
16-
-l best,fast,help,no-action,no-sync,preserve,recursive,verbose,version \
14+
OPTS=$(getopt -o 012345678hnrsvV \
15+
-l best,fast,help,no-action,no-sync,recursive,verbose,version \
1716
-n reflac -- "$@")
1817
TMPDIR="$(mktemp --tmpdir -d reflac.XXXXXXXXXX)"
1918

@@ -41,7 +40,6 @@ Usage: reflac [OPTION]... [--] DIRECTORY...
4140
-8 --best Use the slowest, but best, compression possible.
4241
-n --no-action Do not recompress. With --verbose, displays a list of
4342
files that would be processed.
44-
-p --preserve Preserve file modification time.
4543
-r --recursive Recurse into directories.
4644
-s --no-sync Do not synchronize file data. Will return faster, with
4745
the potential danger to lose your files in a system crash.
@@ -105,9 +103,6 @@ while true ; do
105103
-n|--no-action)
106104
NOACTION=1
107105
shift ;;
108-
-p|--preserve)
109-
PRESERVE_MODTIME="--preserve-modtime"
110-
shift ;;
111106
-r|--recursive)
112107
RECURSIVE=1
113108
shift ;;
@@ -139,9 +134,6 @@ for dir; do
139134
if [ $SYNC -eq 0 ]; then
140135
REFLAC_OPTS="${REFLAC_OPTS}s"
141136
fi
142-
if [ -n "$PRESERVE_MODTIME" ]; then
143-
REFLAC_OPTS="${REFLAC_OPTS}p"
144-
fi
145137

146138
if [ $RECURSIVE -eq 1 ] && [ $NOACTION -eq 1 ]; then
147139
find "$(readlink -f -- "$dir")" -type d -execdir "$SELF" -nv {} \;

reflac.adoc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ store multiple albums or multiple discs in separate directories, you
3636
can just specify the top-level directory with the recursive option
3737
enabled.
3838

39-
*-p*, *--preserve*::
40-
Preserves file modification time stamps, where possible.
41-
4239
*-n*, *--no-action*::
4340
Do not recompress any files. Combined with the *-v* option, reflac
4441
will display a list of files it would otherwise recompress.

0 commit comments

Comments
 (0)