SZEDER Gábor <[email protected]> writes:
>> + bitmap=$(ls .git/objects/pack/*.bitmap) &&
>
> I think the 'ls' is unnecessary and this would do:
>
> bitmap=.git/objects/pack/*.bitmap
Yuck.
>> + test_when_finished "rm -f $bitmap" &&
OK, this will become "rm -f .git/objects/pack/*.bitmap" and then
eval that implements when-finished would make it work OK.
>> + head -c 512 <$bitmap >$bitmap.tmp &&
The reading side would be OK but would the writing side also be
alright?
makefile=Mak?file
head -n 4 <$makefile >$makefile.tmp
/bin/ls -t -1 | head -n 1
Mak?file.tmp
Hmm...
>> + mv $bitmap.tmp $bitmap &&
Likewise...
I said "yuck" because the original does not work if there happen to
be more than (or for that matter, less than) one '.bitmap' file
there. But at least as long as there is one, it should work ;-)