Source

riak-haskell-client / proto.sh

Diff from to
     src/riakclient.proto src/riakextra.proto > src/Protocol.proto
 
 (cd src && hprotoc -p Network.Riak Protocol.proto)
+for i in $(find src/Network/Riak/Protocol -name '*.hs';
+           echo src/Network/Riak/Protocol.hs); do
+    cp /dev/null $i.$$
+    echo '{-# LANGUAGE DeriveDataTypeable #-}' >> $i.$$
+    echo '{-# LANGUAGE FlexibleInstances #-}' >> $i.$$
+    echo '{-# LANGUAGE MultiParamTypeClasses #-}' >> $i.$$
+    echo '{-# OPTIONS_GHC -fno-warn-unused-imports #-}' >> $i.$$
+    cat $i >> $i.$$
+    mv $i.$$ $i
+done
 
 rm src/Protocol.proto