Created
October 22, 2015 11:39
-
-
Save alllex/445f3d74e872fe032596 to your computer and use it in GitHub Desktop.
Script for setting up example of stm-data-collection usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
dir=stm-data-collection-test | |
libdir=stm-data-collection | |
testdir=stm-data-test | |
cd /tmp | |
mkdir $dir | |
cd $dir | |
echo -------------------------------------- | |
echo Cloning library repository | |
echo -------------------------------------- | |
git clone git://github.com/alllex/stm-data-collection.git $libdir | |
echo -------------------------------------- | |
echo Downloading sample files | |
echo -------------------------------------- | |
mkdir $testdir | |
cd $testdir | |
wget https://gist.githubusercontent.com/Alllex/24c4f5b97d4e8ef4bfc6/raw/7758f4c73101503ca8fafb9695977ddef92f7388/stm-data-test.cabal | |
wget https://gist.githubusercontent.com/Alllex/d12f990d9205650f1850/raw/305e03aeada62c52e0d182e36aca0f46db7f9249/Main.hs | |
echo -------------------------------------- | |
echo Creating sandboxes | |
echo -------------------------------------- | |
cabal sandbox init --sandbox . | |
cabal sandbox add-source ../$libdir | |
echo -------------------------------------- | |
echo Installing dependencies | |
echo -------------------------------------- | |
cabal install -j --only-dependencies | |
echo -------------------------------------- | |
echo Configuring and building | |
echo -------------------------------------- | |
cabal configure && cabal build | |
echo -------------------------------------- | |
echo Running testing sample | |
echo -------------------------------------- | |
./dist/build/stm-data-test/stm-data-test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment