stackage/patching/scripts/create-patches.sh
2013-06-30 13:14:05 +03:00

24 lines
352 B
Bash
Executable File

#!/bin/bash -ex
mkdir -p patches work
for f in work/*
do
(
cd $f
PKG=$(basename $(pwd))
cabal sdist
cd ../..
rm -rf tmp
mkdir tmp
cd tmp
tar zxfv ../$f/dist/$PKG.tar.gz
mv $PKG new
cabal unpack $PKG
mv $PKG orig
diff -ru orig new > ../patches/$PKG.patch || true
cd ..
rm -rf tmp
)
done