From: SeokYeon Hwang Date: Tue, 30 Jun 2015 05:10:52 +0000 (+0900) Subject: prerun: enhanced code readability X-Git-Tag: submit/tizen/20151125.063743~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cdfbd498e5517f85872a9dc852d4a15878201ab2;p=platform%2Fadaptation%2Femulator%2Fsystem-plugin-emulator.git prerun: enhanced code readability Change-Id: Ia2910089eac42c2c609eb330ecaada3cff9caebe Signed-off-by: SeokYeon Hwang Signed-off-by: Munkyu Im (cherry picked from commit 082137463a0e9ab58ba36bfecd9d80a4b34b9a5e) --- diff --git a/filesystem/etc/emulator/prerun.d/generate-emulator-env.sh b/filesystem/etc/emulator/prerun.d/generate-emulator-env.sh index c26f3e7..d72ee6b 100644 --- a/filesystem/etc/emulator/prerun.d/generate-emulator-env.sh +++ b/filesystem/etc/emulator/prerun.d/generate-emulator-env.sh @@ -30,15 +30,16 @@ do eval PROXY="\$PROXIES$index" eval URL="\$URLS$index" if [ ! -z ${PROXY} ] ; then - __PROXY=`sed "s/^.*${PROXY}=\([^, ]*\).*$/\1/g" $CMDLINE` - if [ "x${__PROXY}" = "x" ] || ! grep -q ${PROXY} $CMDLINE ; then - echo "export ${PROXY}=" >> $EMULATOR_ENV - echo -e "- ${PROXY}=" - else - echo "export ${PROXY}=${URL}://${__PROXY}/" >> $EMULATOR_ENV - echo -e "- ${PROXY}=${URL}://${__PROXY}/" + EXPORT_CONTENT="${PROXY}=" + if grep -q ${PROXY} $CMDLINE ; then + __PROXY=`sed "s/^.*${PROXY}=\([^, ]*\).*$/\1/g" $CMDLINE` + if [ "x${__PROXY}" != "x" ] ; then + EXPORT_CONTENT="${EXPORT_CONTENT}${URL}://${__PROXY}/" >> $EMULATOR_ENV + fi fi + echo "export ${EXPORT_CONTENT}" >> $EMULATOR_ENV + echo -e "- ${EXPORT_CONTENT}" fi done -echo "export no_proxy=localhost,127.0.0.1/8,10.0.0.0/1" >> $EMULATOR_ENV -echo -e "- no_proxy=localhost,127.0.0.1/8,10.0.0.0/1" +echo "export no_proxy=localhost,127.0.0.1/8,10.0.2.0/24" >> $EMULATOR_ENV +echo -e "- no_proxy=localhost,127.0.0.1/8,10.0.2.0/24"