forked from TokenMarketNet/smart-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerized-solc.sh
executable file
·23 lines (19 loc) · 976 Bytes
/
dockerized-solc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
#
# This is a faux solc stub that runs a dockerized solc
#
VERSION=$SOLC_VERSION
# Docker complains about abs paths
ME=`dirname "$0"`
ME=`realpath $ME`
if [ -z "$SOLC_VERSION" ] ; then
echo "You need to give SOLC_VERSION environment variable"
exit 1
fi
# note: I still do not know how to create different path maps for solc. TokenMarket contracts refer to Zeppelin contracts.
# However regardless where you run solc it assumes Zeppelin contracts are within the current working directory
# under zeppelin folder. This is a workaround if you want to invoke populus compile not under this path,
# but some other path and get Populus testrpc fixture working.
# This is mainly a workaround to get our internal test suite to complete. Before this could be maintained
# using a symbolic link, but Docker volume mounts ignore symbolic links.
docker run -i -a stdin -a stdout -a stderr -v `pwd`:`pwd` -v $ME/zeppelin:$ME/zeppelin -w `pwd` ethereum/solc:$VERSION "$@"