#!/bin/sh
VERSION=4.8.1
tar --files-from=file.list -xJvf ../shadow-$VERSION.tar.xz
mv shadow-$VERSION shadow-$VERSION-orig
cp -rf ./shadow-$VERSION-new ./shadow-$VERSION
diff --unified -Nr shadow-$VERSION-orig shadow-$VERSION > shadow-$VERSION-short-hostname.patch
mv shadow-$VERSION-short-hostname.patch ../patches
rm -rf ./shadow-$VERSION
rm -rf ./shadow-$VERSION-orig