Skip to content

Instantly share code, notes, and snippets.

@alllex
Created October 22, 2015 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alllex/445f3d74e872fe032596 to your computer and use it in GitHub Desktop.
Save alllex/445f3d74e872fe032596 to your computer and use it in GitHub Desktop.
Script for setting up example of stm-data-collection usage
#!/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