I've had some problems to get things work on Ubuntu 16.04, so I decided to post here the fix (workaround) that worked for me.
I've tried to download updates for Windows XP using command:
- Code: Select all
bash DownloadUpdates.sh wxp rus /makeiso /dotnet /excludesp /msse /wddefs
The command itself didn't fail but some parts of download script did:
- Code: Select all
grep: memory exhausted
The fix (workaround) was to split pattern files for grep into smaller chunks with the script named "grep-F-i-v-f":
- Code: Select all
#!/bin/bash
# replacement for grep -F -i -v -f $1 $2
echo >&2 DEBUG: $0 $*
split $1 $1-
cp $2 $2.tmp
for chunk in $1-??
do
grep -F -i -v -f $chunk $2.tmp > $2.tmp-new
mv $2.tmp-new $2.tmp
done
cat $2.tmp
rm $1-??
rm $2.tmp
Download script was modified accordingly with command:
- Code: Select all
sed 's/grep -F -i -v -f/.\/grep-F-i-v-f/' -i DownloadUpdates.sh
Also, download script was trying to use "md5deep" which is seem obsolete, so I had to make a link with such name:
- Code: Select all
ln -s /usr/bin/hashdeep ./md5deep
export PATH=$PATH:.
Hope it helps someone else too.