Skip to content

Commit

Permalink
Fix detection after compile
Browse files Browse the repository at this point in the history
  • Loading branch information
NEMS Linux committed Apr 30, 2019
1 parent 266363b commit 9c4150f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions benchmark.sh
Expand Up @@ -6,12 +6,6 @@ if [[ ! -e /usr/local/bin/nems-info ]]; then
exit 1
fi

nemsinit=`/usr/local/bin/nems-info init`
if [[ $nemsinit == 0 ]]; then
echo "NEMS hasn't been initialized."
exit 1
fi

# Install sysbench if it is not found

# Set the version of sysbench so all match
Expand Down Expand Up @@ -55,7 +49,7 @@ fi
# Clean up
cd /tmp && rm -rf $tmpdir

if [[ ! -f /usr/local/bin/sysbench-$ver ]]; then
if [[ ! -f /usr/local/bin/sysbench-$ver/bin/sysbench ]]; then
# I tried and failed
# Now, report the issue to screen and exit
echo "sysbench could not be installed."
Expand All @@ -64,6 +58,13 @@ fi

fi

# Check if NEMS has been initialized, don't benchmark if not
nemsinit=`/usr/local/bin/nems-info init`
if [[ $nemsinit == 0 ]]; then
echo "NEMS hasn't been initialized."
exit 1
fi

# Good to proceed, begin benchmark

sysbench=/usr/local/bin/sysbench-$ver/bin/sysbench
Expand Down

0 comments on commit 9c4150f

Please sign in to comment.