diff --git a/bin/installsolc.sh b/bin/installsolc.sh new file mode 100755 index 0000000000000000000000000000000000000000..e570285762fe861b0eb25b063b4808cf1f0fafcd --- /dev/null +++ b/bin/installsolc.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +trap "exit 1" ERR +set -x + +test -d ~/new || mkdir ~/new +cd ~/new +if [ -d "solidity" ] +then + cd solidity + git pull +else + git clone --recursive https://github.com/ethereum/solidity.git + cd solidity +fi + +scripts/install_deps.sh + +mkdir -p build +cd build +cmake .. +make solc +install --owner=bfa --target-directory=$( echo ~bfa )/bin solc/solc diff --git a/bin/solc b/bin/solc new file mode 100755 index 0000000000000000000000000000000000000000..56dce9c052bcbf4d13f2af0b835dae033e8b39b6 --- /dev/null +++ b/bin/solc @@ -0,0 +1,32 @@ +#!/bin/bash +# (c) 20190524 NIC Argentina, GPLv2 +# Robert Martin-Legene <robert@nic.ar> + +# See if PATH is set up incorrectly (look for another install of this binary). + +set -x +mypath=$( realpath $0 ) +myname=${mypath##*/} +for p in ${PATH//:/ } +do + checkfile=${p}/${myname} + if [ -x ${checkfile} ] + then + if [ $( realpath ${checkfile} ) = $mypath ] + then + continue + fi + # we found another one, yay! + exec ${checkfile} "$@" + exit 1 + fi +done + +# not found .. tell to install it. +set +x +exec >&2 +echo "***********************************" +echo "solc no esta instalado." +echo "Para instalarlo, usa installsolc.sh" +echo "***********************************" +exit 1