Skip to content
Snippets Groups Projects
Commit f839ea5a authored by Robert Martin-Legene's avatar Robert Martin-Legene
Browse files

$PATH problems solved, for compiling go

parent 4a60c535
No related branches found
No related tags found
No related merge requests found
......@@ -31,14 +31,14 @@ function runasownerof
path=$1
precmd=
shift 1
pushd $path
pushd $path > /dev/null
if [ $( stat --format=%u . ) -ne $UID ]
then
precmd="sudo --set-home -u $( stat --format=%U . )"
precmd="sudo --preserve-env=PATH --set-home -u $( stat --format=%U . )"
fi
unset path
${precmd} "$@"
popd
popd > /dev/null
unset precmd
}
......@@ -139,7 +139,7 @@ function gethinstall
runasownerof ${NEW} git clone https://github.com/ethereum/go-ethereum
fi
info "Compiling geth"
runasownerof . make all
runasownerof ${NEW}/go-ethereum make all
HISBINDIR=$( echo ~bfa/bin )
install --verbose --owner=bfa --group=bfa --directory ${HISBINDIR}
install --verbose --owner=bfa --group=bfa --target-directory=${HISBINDIR} ${NEW}/go-ethereum/build/bin/{geth,bootnode,abigen,ethkey,puppeth,rlpdump,wnode,swarm,swarm-smoke}
......@@ -176,7 +176,7 @@ function userconfig
if [ $( expand < ~bfa/.bashrc | grep -E "source ${BFAHOME}/bin/env" | wc -l ) -eq 0 ]
then
info "Adding to automatically source ${BFAHOME}/bin/env via .bashrc"
echo "test -r ${BFAHOME}/bin/env && source ${BFAHOME}/bin/env" >> .bashrc
echo "test -r ${BFAHOME}/bin/env && source ${BFAHOME}/bin/env" >> ~bfa/.bashrc
fi
# cloning if not done already, or just update (pull)
if [ ! -d "${BFAHOME}" ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment