BBI=$(which bbi)
echo "* bbi path = ${BBI}"
+TMP=$(which bbtk-install-gnome|rev)
+TMP2=$(echo ${TMP#*/}|rev)
+DATAPATH=${TMP2}/@bbtk_install_gnome_DATA_REL_PATH@
+
# The desktop launcher & its icon
echo "* Creating bbi launcher on desktop (${HOME}/.local/share/applications/bbi.desktop)"
-sed s,HOME,${HOME},g bbi.desktop.in > tmp
-sed s,BBI,${BBI},g tmp > tmp2
-mv tmp2 ${HOME}/.local/share/applications/bbi.desktop
-rm tmp
+sed s,HOME,${HOME},g ${DATAPATH}/bbi.desktop.in > bbtk_install_gnome_tmp
+sed s,BBI,${BBI},g bbtk_install_gnome_tmp > bbtk_install_gnome_tmp2
+mv bbtk_install_gnome_tmp2 ${HOME}/.local/share/applications/bbi.desktop
+rm bbtk_install_gnome_tmp
ln -s ${HOME}/.local/share/applications/bbi.desktop ${HOME}/Desktop/bbi.desktop
echo "* Copying bbi icons in ${HOME}/.local/share/applications/"
-cp bbi-icon.png ${HOME}/.local/share/applications/
-cp bbi-icon2.png ${HOME}/.local/share/applications/
+cp ${DATAPATH}/bbi-icon.png ${HOME}/.local/share/applications/
+cp ${DATAPATH}/bbi-icon2.png ${HOME}/.local/share/applications/
# add the type 'text/bbs' to mime database
echo "* Adding mime-type 'text/bbs' to mime database (${HOME}/.local/share/mime/packages/bbs.xml)"
mkdir ${HOME}/.local/share/mime/packages
fi
fi
-cp bbs.xml ${HOME}/.local/share/mime/packages/
+cp ${DATAPATH}/bbs.xml ${HOME}/.local/share/mime/packages/
update-mime-database ${HOME}/.local/share/mime
nautilus --quit
nautilus ${HOME}/Desktop &