mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-12 15:28:29 +01:00
Patching scripts
This commit is contained in:
parent
6644fa63c6
commit
bbec9acf5d
3
patching/.gitignore
vendored
Normal file
3
patching/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/patches
|
||||
/tarballs
|
||||
/work
|
||||
23
patching/scripts/create-patches.sh
Executable file
23
patching/scripts/create-patches.sh
Executable 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
|
||||
21
patching/scripts/create-tarballs.sh
Executable file
21
patching/scripts/create-tarballs.sh
Executable 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
|
||||
6
patching/scripts/edit-package.sh
Executable file
6
patching/scripts/edit-package.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
mkdir -p work
|
||||
cd work
|
||||
rm -rf $1
|
||||
cabal unpack $1
|
||||
Loading…
Reference in New Issue
Block a user