From 73144ce8e5b770ea31a7286490287c6552d651df Mon Sep 17 00:00:00 2001 From: Andreas Meingast Date: Fri, 8 Mar 2013 14:10:54 +0100 Subject: [PATCH 1/4] Added gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1377554 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.swp From 8f0bc690e65f3ddfe7c43b356f735cec46b7d1c5 Mon Sep 17 00:00:00 2001 From: Andreas Meingast Date: Fri, 8 Mar 2013 14:10:58 +0100 Subject: [PATCH 2/4] Strip binary after compilation --- bin/compile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/compile b/bin/compile index 5adebcd..15badbc 100755 --- a/bin/compile +++ b/bin/compile @@ -70,6 +70,11 @@ rm $HOME/.cabal/bin/!(cabal|happy) mv $HOME/.cabal $CACHE_DIR/cabal mv $HOME/.ghc $CACHE_DIR/dotghc +PROJECT=$(awk /Name:/'{print $2}' *.cabal) +EXEC="./dist/build/$PROJECT/$PROJECT" +echo "-----> Stripping binary $EXEC" +strip $EXEC + echo "Cache dir size:" du -ms $CACHE_DIR echo "Build dir size:" From b0282de5c85b153be0bae811668e5417345e8c90 Mon Sep 17 00:00:00 2001 From: Andreas Meingast Date: Tue, 12 Mar 2013 21:28:12 +0100 Subject: [PATCH 3/4] Fixed cabal Name capitalization bug --- bin/compile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/compile b/bin/compile index 15badbc..6e06273 100755 --- a/bin/compile +++ b/bin/compile @@ -70,7 +70,7 @@ rm $HOME/.cabal/bin/!(cabal|happy) mv $HOME/.cabal $CACHE_DIR/cabal mv $HOME/.ghc $CACHE_DIR/dotghc -PROJECT=$(awk /Name:/'{print $2}' *.cabal) +PROJECT=$(awk /[nN]ame:/'{print $2}' *.cabal) EXEC="./dist/build/$PROJECT/$PROJECT" echo "-----> Stripping binary $EXEC" strip $EXEC From c8099e4c247058d84aa8b4b1d4425fc881b2a2a4 Mon Sep 17 00:00:00 2001 From: Andreas Meingast Date: Mon, 15 Apr 2013 18:16:06 +0200 Subject: [PATCH 4/4] print out binary size after succesful compilation --- bin/compile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/compile b/bin/compile index 6e06273..4b8d638 100755 --- a/bin/compile +++ b/bin/compile @@ -79,3 +79,5 @@ echo "Cache dir size:" du -ms $CACHE_DIR echo "Build dir size:" du -ms $BUILD_DIR +echo "Binary size:" +du -ms $EXEC