#!/bin/sh
VERSION=5.2
tar --files-from=file.list -xJvf ../tftp-hpa-$VERSION.tar.xz
mv tftp-hpa-$VERSION tftp-hpa-$VERSION-orig
cp -rf ./tftp-hpa-$VERSION-new ./tftp-hpa-$VERSION
diff --unified -Nr tftp-hpa-$VERSION-orig tftp-hpa-$VERSION > tftp-hpa-$VERSION-strcpy-crash.patch
mv tftp-hpa-$VERSION-strcpy-crash.patch ../patches
rm -rf ./tftp-hpa-$VERSION
rm -rf ./tftp-hpa-$VERSION-orig