mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #1317 from ethereum/timelock
Compile all contracts in the std directory
This commit is contained in:
commit
42617cb8dd
@ -28,8 +28,22 @@
|
||||
|
||||
set -e
|
||||
|
||||
# There is an implicit assumption here that we HAVE to run from root directory.
|
||||
REPO_ROOT=$(pwd)
|
||||
REPO_ROOT="$(dirname "$0")"/..
|
||||
|
||||
# Compile all files in std and examples.
|
||||
|
||||
for f in "$REPO_ROOT"/std/*.sol
|
||||
do
|
||||
echo "Compiling $f..."
|
||||
set +e
|
||||
output=$("$REPO_ROOT"/build/solc/solc "$f" 2>&1)
|
||||
failed=$?
|
||||
# Remove the pre-release warning from the compiler output
|
||||
output=$(echo "$output" | grep -v 'pre-release')
|
||||
echo "$output"
|
||||
set -e
|
||||
test -z "$output" -a "$failed" -eq 0
|
||||
done
|
||||
|
||||
# This conditional is only needed because we don't have a working Homebrew
|
||||
# install for `eth` at the time of writing, so we unzip the ZIP file locally
|
||||
|
@ -1,3 +1,5 @@
|
||||
pragma solidity ^0.4.0;
|
||||
|
||||
import "./Token.sol";
|
||||
|
||||
contract StandardToken is Token {
|
||||
|
@ -1,3 +1,5 @@
|
||||
pragma solidity ^0.4.0;
|
||||
|
||||
contract Token {
|
||||
event Transfer(address indexed _from, address indexed _to, uint256 _value);
|
||||
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
|
||||
|
@ -1,3 +1,5 @@
|
||||
pragma solidity ^0.4.0;
|
||||
|
||||
import "./owned.sol";
|
||||
|
||||
contract mortal is owned {
|
||||
|
@ -1,3 +1,5 @@
|
||||
pragma solidity ^0.4.0;
|
||||
|
||||
contract owned {
|
||||
address owner;
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
pragma solidity ^0.4.0;
|
||||
|
||||
import "./owned.sol";
|
||||
import "./mortal.sol";
|
||||
import "./Token.sol";
|
||||
|
Loading…
Reference in New Issue
Block a user