-e not -a

-a did not work as expected but -e does.

-e should detect existence of either symbolic link or directory and return true.

see: http://www.gnu.org/software/bash/manual/bashref.html#Bash-Conditional-Expressions
This commit is contained in:
Jason Coombs 2016-06-30 18:32:24 -10:00 committed by GitHub
parent 9ce64fa648
commit 4207f4b6c5

View file

@ -10,14 +10,14 @@ if [ ! -f "$root/build/env.sh" ]; then
fi
# Create build/bin if it doesn't exist yet.
if [ ! -a "$root/build/bin" ]; then
if [ ! -e "$root/build/bin" ]; then
mkdir -p "$root/build/bin"
fi
# Create fake Go workspace if it doesn't exist yet.
workspace="$root/../_go_build/_workspace"
ethdir="$workspace/src/github.com/ethereum"
if [ ! -a "$ethdir/go-ethereum" ]; then
if [ ! -e "$ethdir/go-ethereum" ]; then
mkdir -p "$ethdir"
cd "$ethdir"
ln -s "$root" go-ethereum