summaryrefslogtreecommitdiff
path: root/package/tidlc.remove.macos
blob: dabf205eb2830dfb8063fed281957ca9bcfbdb3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash -ex
rm ${INSTALLED_PATH}/tidlc
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

exit 0