stackage/patching/scripts/create-patches.sh
2014-08-03 09:47:03 +03:00

26 lines
372 B
Bash
Executable File

#!/bin/bash -ex
shopt -s nullglob
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 -ruN orig new > ../patches/$PKG.patch || true
cd ..
rm -rf tmp
)
done