[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: makeicecat fails for a miscalculation of the version of rename
From: |
bill-auger |
Subject: |
Re: makeicecat fails for a miscalculation of the version of rename |
Date: |
Fri, 20 Jan 2023 07:02:23 -0500 |
forgot a few stray bits
- # TODO: consider removing this dependency and using GNU find
- local required_ver
i dont think anyone is going to re-work those commands - it would be much
messier
than the rename implememtation
revised patch:
diff --git a/makeicecat b/makeicecat
index 543e2ad..b1f7392 100755
--- a/makeicecat
+++ b/makeicecat
@@ -48,8 +48,6 @@ readonly
PREFS_IN_FILE=browser/locales/en-US/browser/preferences/preferences.ftl
readonly PREFS_OUT_FILE=/browser/browser/preferences/preferences.ftl
# build environment, working directory, and outputs
-readonly MIN_RENAME_VER_MAJ=1
-readonly MIN_RENAME_VER_MIN=10
readonly DATADIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/data
readonly ICECATVERSION=${FFVERSION}-gnu${GNUVERSION}
readonly OUTPUT_SOURCEBALL=icecat-${ICECATVERSION}.tar.bz2
@@ -132,23 +130,19 @@ validate_env()
# verify that Perl 'rename' is available and sufficent
local rename_cmds=(
# NOTE: order is important -- 'util-linux' provides a binary named
'rename'
- # TODO: consider removing this dependency and using GNU find
'rename' # guix
'perl-rename' # arch derivatives
'prename' # debian derivatives
)
local rename_cmd
- local required_ver
for rename_cmd in ${rename_cmds[@]}
do which ${rename_cmd} &> /dev/null && RENAME_CMD=${rename_cmd}
done
readonly RENAME_CMD
- if ! ( [[ "$( ${RENAME_CMD} --version )" =~ 'File::Rename version
'([0-9]+)\.([0-9]+) ]] &&
- (( ${BASH_REMATCH[1]} >= MIN_RENAME_VER_MAJ )) &&
- (( ${BASH_REMATCH[2]} >= MIN_RENAME_VER_MIN )) )
+ if ! ${RENAME_CMD} --nofullpath 's|||' no-such-file &> /dev/null
then
- required_ver=${MIN_RENAME_VER_MAJ}.${MIN_RENAME_VER_MIN}
- echo -e "\nERROR: This script requires the Perl rename program
(version >= ${required_ver})
+ echo -e "\nERROR: This script requires the \"Robin Barker\" variant of
the Perl rename program (version >= 1.10).
+That is the variant in most distros. The \"pederst\" variant in arch-based
distros, is incompatible.
e.g.: 'rename' from the Guix 'rename' package
'perl-rename' from the Parabola 'perl-file-rename' package
'prename' from the Trisquel 'rename' package"