-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathicestorm.sh
More file actions
executable file
·36 lines (30 loc) · 812 Bytes
/
Copy pathicestorm.sh
File metadata and controls
executable file
·36 lines (30 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
pushd `dirname $0` > /dev/null
DIR=`pwd -P`
popd > /dev/null
PYTHONVERSION=$(python3 --version 2>&1 | egrep -o '3\.[0-9]+')
UNAME_STR=`uname`
if [ ! -d $DIR/icestorm ]; then
echo "Checking out icestorm..."
git clone https://github.com/cliffordwolf/icestorm.git $DIR/icestorm
cd $DIR/icestorm/
else
cd $DIR/icestorm
echo "Updating icestorm..."
git pull origin master || exit 1
fi
cd $DIR/icestorm
echo "Building icestorm..."
if [[ "$UNAME_STR" == "Darwin" ]] && hash brew 2>/dev/null; then
PYTHONPATH=$(brew --prefix)/lib/python$PYTHONVERSION/site-packages/ make clean
PYTHONPATH=$(brew --prefix)/lib/python$PYTHONVERSION/site-packages/ make
else
make clean
make
fi
echo "Installing icestorm..."
if [[ "$UNAME_STR" == "Darwin" ]]; then
make install
else
sudo make install
fi