Avoid some unnecessary command invocations in scripts.
This commit is contained in:
parent
4302a06700
commit
398ae27985
|
@ -17,10 +17,9 @@ for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \
|
|||
./usr/share/doc/*/man/man* ./usr/lib/*/man/man*
|
||||
do
|
||||
[ -d $d ] || continue
|
||||
for f in `find $d -type f`
|
||||
for f in `find $d -type f ! -name dir`
|
||||
do
|
||||
[ -f "$f" ] || continue
|
||||
[ "`basename $f`" = "dir" ] && continue
|
||||
|
||||
case "$f" in
|
||||
*.gz|*.Z) gunzip -f $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;;
|
||||
|
|
|
@ -8,7 +8,7 @@ fi
|
|||
# Hardlink identical *.pyc and *.pyo, originally from PLD's rpm-build-macros
|
||||
# Modified to use sha1sum instead of cmp to avoid a diffutils dependency.
|
||||
find "$RPM_BUILD_ROOT" -type f -name "*.pyc" | while read pyc ; do
|
||||
pyo="$(echo $pyc | sed -e 's/.pyc$/.pyo/')"
|
||||
pyo="${pyc%c}o"
|
||||
if [ -f "$pyo" ] ; then
|
||||
csha="$(sha1sum -b $pyc | cut -d' ' -f 1)" && \
|
||||
osha="$(sha1sum -b $pyo | cut -d' ' -f 1)" && \
|
||||
|
|
Loading…
Reference in New Issue