on 08b185a help sign in
stackage/patching/scripts/create-patches.sh
25 lines 372 B history raw
1#!/bin/bash -ex
3shopt -s nullglob
5mkdir -p patches work
7for f in work/*
8do
9 (
10 cd $f
11 PKG=$(basename $(pwd))
12 cabal sdist
13 cd ../..
14 rm -rf tmp
15 mkdir tmp
16 cd tmp
17 tar zxfv ../$f/dist/$PKG.tar.gz
18 mv $PKG new
19 cabal unpack $PKG
20 mv $PKG orig
21 diff -ruN orig new > ../patches/$PKG.patch || true
22 cd ..
23 rm -rf tmp
24 )
25done