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 ...@@ -31,14 +31,14 @@ function runasownerof
path=$1 path=$1
precmd= precmd=
shift 1 shift 1
pushd $path pushd $path > /dev/null
if [ $( stat --format=%u . ) -ne $UID ] if [ $( stat --format=%u . ) -ne $UID ]
then then
precmd="sudo --set-home -u $( stat --format=%U . )" precmd="sudo --preserve-env=PATH --set-home -u $( stat --format=%U . )"
fi fi
unset path unset path
${precmd} "$@" ${precmd} "$@"
popd popd > /dev/null
unset precmd unset precmd
} }
...@@ -139,7 +139,7 @@ function gethinstall ...@@ -139,7 +139,7 @@ function gethinstall
runasownerof ${NEW} git clone https://github.com/ethereum/go-ethereum runasownerof ${NEW} git clone https://github.com/ethereum/go-ethereum
fi fi
info "Compiling geth" info "Compiling geth"
runasownerof . make all runasownerof ${NEW}/go-ethereum make all
HISBINDIR=$( echo ~bfa/bin ) HISBINDIR=$( echo ~bfa/bin )
install --verbose --owner=bfa --group=bfa --directory ${HISBINDIR} 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} 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 ...@@ -176,7 +176,7 @@ function userconfig
if [ $( expand < ~bfa/.bashrc | grep -E "source ${BFAHOME}/bin/env" | wc -l ) -eq 0 ] if [ $( expand < ~bfa/.bashrc | grep -E "source ${BFAHOME}/bin/env" | wc -l ) -eq 0 ]
then then
info "Adding to automatically source ${BFAHOME}/bin/env via .bashrc" 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 fi
# cloning if not done already, or just update (pull) # cloning if not done already, or just update (pull)
if [ ! -d "${BFAHOME}" ] 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