[Title] Add sbi, sdb's environment
authortaeyoung2.son <taeyoung2.son@samsung.com>
Mon, 12 Dec 2011 04:09:32 +0000 (13:09 +0900)
committertaeyoung2.son <taeyoung2.son@samsung.com>
Mon, 12 Dec 2011 04:09:32 +0000 (13:09 +0900)
[Type] Feature
[Module] Sub
[Priority] Minor
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]

packager/linux/install.sh
packager/linux/remove.sh

index 630eb79..37680bc 100755 (executable)
@@ -83,5 +83,16 @@ then
        fi
 fi
 
+## Set sbi, sdb's environment path
+cat >> ${HOME}/.bashrc << END
+## Tizen SDK configuration
+# This is generated by Tizen SDK. Please do not modify by yourself.
+# Set sbi, sdb environment path
+export PATH=\$PATH:${Tizen_SDK_INSTALL_PATH}/SDK/sdb:${Tizen_SDK_INSTALL_PATH}/SDK/build-system/bin
+## End Tizen SDK configuration
+END
+
+source ${HOME}/.bashrc
 
 exit 0
+
index d5cd106..d0c6221 100755 (executable)
@@ -11,4 +11,22 @@ rm -rf ${INSTALLED_PATH}/${ide_path}/p2
 font_script_path=${INSTALLED_PATH}/${ide_path}/resources/fonts/install_tizenfont.sh
 chmod +x ${font_script_path}
 ${font_script_path} uninstall
+
+## remove sbi, sdb environment path
+s=`cat ${HOME}/.bashrc | grep -n "## Tizen SDK configuration" | cut -f1 -d":"`
+
+if [ "x${s}" = "x" ] ; then
+       exit 1
+fi
+
+if [ $s -ge 0 ] ; then
+       e=`cat ${HOME}/.bashrc | grep -n "## End Tizen SDK configuration" | cut -f1 -d":"`
+       if [ $e -ge $s ] ; then
+               cp ${HOME}/.bashrc ${HOME}/.bashrc.tizen
+               sed "${s},${e}d" ${HOME}/.bashrc > ${HOME}/.bashrc.swap
+               mv ${HOME}/.bashrc.swap ${HOME}/.bashrc
+               source ${HOME}/.bashrc
+       fi
+fi
+
 ### End ###