[PC-BSD Commits] r9471 - pcbsd/current/src-sh/pbi-manager
svn at pcbsd.org
svn at pcbsd.org
Thu Mar 3 11:56:10 PST 2011
Author: kris
Date: 2011-03-03 11:56:09 -0800 (Thu, 03 Mar 2011)
New Revision: 9471
Modified:
pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:
Make pbi-manager agnostic to the default icon format
Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager 2011-03-03 19:39:21 UTC (rev 9470)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager 2011-03-03 19:56:09 UTC (rev 9471)
@@ -2522,12 +2522,16 @@
fi
echo "SideBanner: ${pbi_guiside}"
fi
- if [ -e "${dir}/pbi_icon.png" ] ; then
+
+ # Try to find an icon
+ ls ${dir}/pbi_icon.* >/dev/null 2>/dev/null
+ if [ "$?" = "0" ] ; then
+ _iconExt=`ls ${dir}/pbi_icon.* | head -n 1 | awk -F . '{print $NF}'`
if [ "$copy" = "COPY" ] ; then
- pbi_guiicon="/tmp/.PBI-icon.$$.png"
- cp "${dir}/pbi_icon.png" "$pbi_guiicon"
+ pbi_guiicon="/tmp/.PBI-icon.$$.${_iconExt}"
+ cp "${dir}/pbi_icon.${_iconExt}" "$pbi_guiicon"
else
- pbi_guiicon="${dir}/pbi_icon.png"
+ pbi_guiicon="${dir}/pbi_icon.${_iconExt}"
fi
echo "Icon: ${pbi_guiicon}"
fi
@@ -3642,9 +3646,12 @@
# Copy over our icon
if [ ! -z "${PBI_PROGICON}" -a -e "${PBI_STAGEDIR}/${PBI_PROGICON}" ] ; then
- cp "${PBI_STAGEDIR}/${PBI_PROGICON}" "${PBI_HEADERDIR}/pbi_icon.png"
+ # Get the file extension
+ _iconExt=`echo "$PBI_PROGICON" | awk -F . '{print $NF}'`
+ cp "${PBI_STAGEDIR}/${PBI_PROGICON}" "${PBI_HEADERDIR}/pbi_icon.${_iconExt}"
else
- cp "${PBI_DEFAULT_ICON}" "${PBI_HEADERDIR}/pbi_icon.png"
+ _iconExt=`echo "$PBI_DEFAULT_ICON" | awk -F . '{print $NF}'`
+ cp "${PBI_DEFAULT_ICON}" "${PBI_HEADERDIR}/pbi_icon.${_iconExt}"
fi
# Check for any gui images
More information about the Commits
mailing list