Fix some shellcheck linter warnings
* admin/diff-tar-files: * admin/merge-gnulib: * admin/merge-pkg-config: * admin/update-copyright: * build-aux/git-hooks/prepare-commit-msg: * make-dist: Fix some shellcheck linter warnings.
This commit is contained in:
parent
46c4bcd392
commit
efe591143f
6 changed files with 27 additions and 27 deletions
|
@ -35,7 +35,7 @@ old_tmp=/tmp/old.$$
|
|||
new_tmp=/tmp/new.$$
|
||||
trap "rm -f $old_tmp $new_tmp; exit 1" 1 2 15
|
||||
|
||||
tar tzf $old_tar | sed -e 's,^[^/]*,,' | sort > $old_tmp
|
||||
tar tzf $new_tar | sed -e 's,^[^/]*,,' | sort > $new_tmp
|
||||
tar tzf "$old_tar" | sed -e 's,^[^/]*,,' | sort > $old_tmp
|
||||
tar tzf "$new_tar" | sed -e 's,^[^/]*,,' | sort > $new_tmp
|
||||
diff -u $old_tmp $new_tmp
|
||||
rm -f $new_tmp $old_tmp
|
||||
|
|
|
@ -105,8 +105,8 @@ for module in $AVOIDED_MODULES; do
|
|||
avoided_flags="$avoided_flags --avoid=$module"
|
||||
done
|
||||
|
||||
"$gnulib_srcdir"/gnulib-tool --dir="$src" $GNULIB_TOOL_FLAGS \
|
||||
$avoided_flags $GNULIB_MODULES &&
|
||||
"$gnulib_srcdir"/gnulib-tool --dir="$src" "$GNULIB_TOOL_FLAGS" \
|
||||
"$avoided_flags" "$GNULIB_MODULES" &&
|
||||
rm -- "$src"lib/gl_openssl.h "$src"m4/fcntl-o.m4 \
|
||||
"$src"m4/gl-openssl.m4 \
|
||||
"$src"m4/gnulib-cache.m4 "$src"m4/gnulib-tool.m4 \
|
||||
|
|
|
@ -60,4 +60,4 @@ test -d m4 || {
|
|||
|
||||
printf >&2 '%s\n' "$0: copying $dir/pkg.m4 to m4/pkg.m4"
|
||||
|
||||
cp $dir/pkg.m4 m4
|
||||
cp "$dir"/pkg.m4 m4
|
||||
|
|
|
@ -53,7 +53,7 @@ repo_files=$(git ls-files) &&
|
|||
# . They are GMP files, maintained by the GMP project, with their own dates.
|
||||
# . Their format cannot withstand changing the contents of copyright strings.
|
||||
|
||||
updatable_files=$(find $repo_files \
|
||||
updatable_files=$(find "$repo_files" \
|
||||
! -name COPYING \
|
||||
! -name doclicense.texi \
|
||||
! -name gpl.texi \
|
||||
|
@ -74,4 +74,4 @@ updatable_files=$(find $repo_files \
|
|||
! -name 'mini-gmp.[ch]' \
|
||||
-print) &&
|
||||
|
||||
build-aux/update-copyright $updatable_files
|
||||
build-aux/update-copyright "$updatable_files"
|
||||
|
|
|
@ -24,9 +24,9 @@ SHA1=$3
|
|||
|
||||
# Prefer gawk if available, as it handles NUL bytes properly.
|
||||
if type gawk >/dev/null 2>&1; then
|
||||
awk=gawk
|
||||
awk="gawk"
|
||||
else
|
||||
awk=awk
|
||||
awk="awk"
|
||||
fi
|
||||
|
||||
exec $awk '
|
||||
|
|
36
make-dist
36
make-dist
|
@ -190,7 +190,7 @@ if [ ! "${version}" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
echo Version number is $version
|
||||
echo Version number is "$version"
|
||||
|
||||
if [ $update = yes ]; then
|
||||
if ! grep -q "tree holds version *${version}" README; then
|
||||
|
@ -257,8 +257,8 @@ if [ $check = yes ]; then
|
|||
bogosities=
|
||||
while read elc; do
|
||||
el=`echo $elc | sed 's/c$//'`
|
||||
[ -r $el ] || continue
|
||||
[ $elc -nt $el ] || bogosities="$bogosities $elc"
|
||||
[ -r "$el" ] || continue
|
||||
[ "$elc" -nt "$el" ] || bogosities="$bogosities $elc"
|
||||
done < $temp_elc
|
||||
|
||||
if [ x"${bogosities}" != x"" ]; then
|
||||
|
@ -271,7 +271,7 @@ if [ $check = yes ]; then
|
|||
|
||||
bogosities=
|
||||
for file in $losers; do
|
||||
grep -q "^;.*no-byte-compile: t" $file && continue
|
||||
grep -q "^;.*no-byte-compile: t" "$file" && continue
|
||||
case $file in
|
||||
site-init.el | site-load.el | site-start.el | default.el) continue ;;
|
||||
esac
|
||||
|
@ -295,8 +295,8 @@ if [ $check = yes ]; then
|
|||
info=`sed -n 's/^@setfilename //p' $texi | sed 's|.*info/||'`
|
||||
[ x"${info}" != x"" ] || continue
|
||||
info=info/$info
|
||||
[ -r $info ] || continue
|
||||
[ $info -nt $texi ] || bogosities="$bogosities $info"
|
||||
[ -r "$info" ] || continue
|
||||
[ "$info" -nt "$texi" ] || bogosities="$bogosities $info"
|
||||
done < $temp_el
|
||||
|
||||
rm -f $temp_el
|
||||
|
@ -407,7 +407,7 @@ if ( [ $update = yes ] || [ ! -f $manifest ] ) && [ -r .git ]; then
|
|||
else
|
||||
git ls-files | grep -v '^test' >$manifest
|
||||
fi || exit
|
||||
printf '%s\n' $possibly_non_vc_files $info_files >>$manifest || exit
|
||||
printf '%s\n' "$possibly_non_vc_files" "$info_files" >>$manifest || exit
|
||||
sort -u -o $manifest $manifest || exit
|
||||
fi
|
||||
|
||||
|
@ -424,7 +424,7 @@ if [ $verbose = yes ] && (mkdir --verbose ${tempdir}) >/dev/null 2>&1; then
|
|||
mkdir_verbose='mkdir --verbose'
|
||||
else
|
||||
mkdir $tempdir || exit
|
||||
mkdir_verbose=mkdir
|
||||
mkdir_verbose="mkdir"
|
||||
fi
|
||||
|
||||
# file_to_skip is normally empty to link every file,
|
||||
|
@ -460,14 +460,14 @@ MANIFEST_subdir_sed='
|
|||
s,^,'$tempdir'/,
|
||||
'
|
||||
tempsubdirs=$(sed "$MANIFEST_subdir_sed" $manifest | sort -u)
|
||||
$mkdir_verbose -p $tempsubdirs || exit
|
||||
$mkdir_verbose -p "$tempsubdirs" || exit
|
||||
|
||||
echo "Making links to files"
|
||||
while read file; do
|
||||
case $file in
|
||||
MANIFEST) ln $manifest $tempdir/MANIFEST || exit ;;
|
||||
$file_to_skip) continue ;;
|
||||
*) ln $file $tempdir/$file || exit ;;
|
||||
*) ln "$file" $tempdir/"$file" || exit ;;
|
||||
esac
|
||||
done <$manifest
|
||||
|
||||
|
@ -476,7 +476,7 @@ if [ "${newer}" ]; then
|
|||
## We remove .elc files unconditionally, on the theory that anyone picking
|
||||
## up an incremental distribution already has a running Emacs to byte-compile
|
||||
## them with.
|
||||
find ${tempdir} \( -name '*.elc' -o ! -newer ${newer} \) \
|
||||
find ${tempdir} \( -name '*.elc' -o ! -newer "${newer}" \) \
|
||||
-exec rm -f {} \; || exit
|
||||
fi
|
||||
|
||||
|
@ -487,12 +487,12 @@ if [ "${make_tar}" = yes ]; then
|
|||
sed -e 's/^:/.:/' -e 's/::/:.:/g' -e 's/:$/:./' -e 's/:/ /g'
|
||||
`
|
||||
for dir in ${temppath}; do
|
||||
[ -x ${dir}/$default_gzip ] || continue
|
||||
[ -x "${dir}"/$default_gzip ] || continue
|
||||
found=1; break
|
||||
done
|
||||
if [ "$found" = "0" ]; then
|
||||
echo "WARNING: '$default_gzip' not found, will not compress" >&2
|
||||
default_gzip=cat
|
||||
default_gzip="cat"
|
||||
fi
|
||||
case "${default_gzip}" in
|
||||
bzip2) gzip_extension=.bz2 ;;
|
||||
|
@ -508,17 +508,17 @@ if [ "${make_tar}" = yes ]; then
|
|||
|
||||
(cd $tempparent &&
|
||||
case $default_gzip in
|
||||
cat) tar $taropt -cf - $emacsname;;
|
||||
*) if tar $taropt -cf /dev/null --use-compress-program="$default_gzip" \
|
||||
cat) tar "$taropt" -cf - $emacsname;;
|
||||
*) if tar "$taropt" -cf /dev/null --use-compress-program="$default_gzip" \
|
||||
$emacsname/src/lisp.h > /dev/null 2>&1
|
||||
then
|
||||
tar $taropt -cf - --use-compress-program="$default_gzip" $emacsname
|
||||
tar "$taropt" -cf - --use-compress-program="$default_gzip" $emacsname
|
||||
else
|
||||
tar $taropt -cf $emacsname.tar $emacsname &&
|
||||
tar "$taropt" -cf $emacsname.tar $emacsname &&
|
||||
$default_gzip <$emacsname.tar
|
||||
fi;;
|
||||
esac
|
||||
) >$emacsname.tar$gzip_extension || exit
|
||||
) >$emacsname.tar"$gzip_extension" || exit
|
||||
fi
|
||||
|
||||
## Why are we deleting the staging directory if clean_up is no?
|
||||
|
|
Loading…
Add table
Reference in a new issue