Patching scripts

This commit is contained in:
Michael Snoyman 2013-06-30 13:14:05 +03:00
parent 6644fa63c6
commit bbec9acf5d
4 changed files with 53 additions and 0 deletions

3
patching/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/patches
/tarballs
/work

View File

@ -0,0 +1,23 @@
#!/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

View File

@ -0,0 +1,21 @@
#!/bin/bash -ex
mkdir -p tarballs
for f in patches/*
do
(
PKG1=$(basename $f)
PKG=${PKG1%.patch}
rm -rf tmp
mkdir tmp
cd tmp
cabal unpack $PKG
cd $PKG
patch -p1 < ../../$f
cabal sdist
mv dist/$PKG.tar.gz ../../tarballs
cd ..
rm -rf tmp
)
done

View File

@ -0,0 +1,6 @@
#!/bin/bash -ex
mkdir -p work
cd work
rm -rf $1
cabal unpack $1