From 6fa01a3b2d75ec2c13a9ed87c66dc96064bfad16 Mon Sep 17 00:00:00 2001
From: kytv <kytv@mail.i2p>
Date: Sat, 10 Dec 2011 20:11:21 +0000
Subject: [PATCH] Better command to determine JAVABINARY

Switch to one awk command instead of using grep and cut.
---
 installer/resources/i2prouter | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/installer/resources/i2prouter b/installer/resources/i2prouter
index cbfdf7052c..793555a01e 100644
--- a/installer/resources/i2prouter
+++ b/installer/resources/i2prouter
@@ -137,7 +137,7 @@ if [ ! -e $WRAPPER_CONF ]; then
 fi
 
 # Workaround for Gentoo
-JAVABINARY=`grep ^wrapper\.java\.command $WRAPPER_CONF | cut -f2 -d=`
+JAVABINARY=$(awk -F'=' '/^ *wrapper\.java\.command/{print $2}' $WRAPPER_CONF)
 
 if [ -e /etc/gentoo-release ]; then
     if [ $JAVABINARY = java ]; then
-- 
GitLab