From 4ae04a1f69b83036ca44e746006fbc7e79c211a3 Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Wed, 29 Nov 2017 14:06:34 +0530 Subject: [PATCH] electron-219: added logic to set default values in the postinstall script --- installer/mac/postinstall.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/installer/mac/postinstall.sh b/installer/mac/postinstall.sh index a285adb4..3fab11a3 100755 --- a/installer/mac/postinstall.sh +++ b/installer/mac/postinstall.sh @@ -12,6 +12,22 @@ minimize_on_close=$(sed -n '2p' '/tmp/sym_settings.txt'); launch_on_startup=$(sed -n '3p' '/tmp/sym_settings.txt'); always_on_top=$(sed -n '4p' '/tmp/sym_settings.txt'); +if [ "$pod_url" == "" ]; then + pod_url="https://corporate.symphony.com" +fi + +if [ "$minimize_on_close" == "" ]; then + minimize_on_close=true; +fi + +if [ "$launch_on_startup" == "" ]; then + launch_on_startup=true; +fi + +if [ "$always_on_top" == "" ]; then + always_on_top=false; +fi + ## Replace the default settings with the user selected settings ## sed -i "" -E "s#\"url\" ?: ?\".*\"#\"url\"\: \"$pod_url\"#g" ${newPath} sed -i "" -E "s#\"minimizeOnClose\" ?: ?([Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])#\"minimizeOnClose\":\ $minimize_on_close#g" ${newPath}