summaryrefslogtreecommitdiff
path: root/sysui
diff options
context:
space:
mode:
authorTomáš Chvátal <tomas.chvatal@gmail.com>2011-08-01 15:14:46 +0200
committerCaolán McNamara <caolanm@redhat.com>2011-09-13 12:26:13 +0100
commitd670cdcf33f93d67293ceca82ceff2cff7ba8a63 (patch)
tree2a91b0367faee27d693c8bd1466ca0d3f2e4d507 /sysui
parente118630f22521356c405e29c13b5d7300da1b24f (diff)
Fix quoting in create_tree so distdir can have spaces in it.
Diffstat (limited to 'sysui')
-rwxr-xr-xsysui/desktop/share/create_tree.sh85
1 files changed, 43 insertions, 42 deletions
diff --git a/sysui/desktop/share/create_tree.sh b/sysui/desktop/share/create_tree.sh
index 2a5b26a2f2ed..8f7478728bd4 100755
--- a/sysui/desktop/share/create_tree.sh
+++ b/sysui/desktop/share/create_tree.sh
@@ -1,71 +1,72 @@
+#!/bin/sh
umask 022
-if [ "${KDEMAINDIR}" ]
-then
- echo Copying icons ..
- for i in `cd ${ICON_SOURCE_DIR}; find ${ICON_THEMES:-hicolor/???x??? hicolor/??x?? locolor} -name "*.png"`
+if [ "${KDEMAINDIR}" ]; then
+ echo "Copying icons..."
+ for i in `cd "${ICON_SOURCE_DIR}"; find "${ICON_THEMES:-hicolor/???x??? hicolor/??x?? locolor}" -name "*.png"`
do
- targetdir=${DESTDIR}/${KDEMAINDIR}/share/icons/`dirname $i`
- mkdir -p $targetdir
- destfile=$targetdir/${ICON_PREFIX:-}${ICON_PREFIX:+-}`basename $i`
- cp ${ICON_SOURCE_DIR}/$i $destfile
- chmod 0644 $destfile
+ targetdir=${DESTDIR}/${KDEMAINDIR}/share/icons/`dirname ${i}`
+ mkdir -p "${targetdir}"
+ destfile=$targetdir/${ICON_PREFIX:-}${ICON_PREFIX:+-}`basename ${i}`
+ cp "${ICON_SOURCE_DIR}/${i}" "${destfile}"
+ chmod 0644 "${destfile}"
done
+ unset targetdir destfile
- mkdir -p ${DESTDIR}/${KDEMAINDIR}/share/mimelnk/application
+ mkdir -p "${DESTDIR}/${KDEMAINDIR}/share/mimelnk/application"
for i in `cat mimelnklist`; do
- cp $i ${DESTDIR}/${KDEMAINDIR}/share/mimelnk/application/${PREFIX}-$i
+ cp "${i}" "${DESTDIR}/${KDEMAINDIR}/share/mimelnk/application/${PREFIX}-${i}"
done
- chmod 0644 ${DESTDIR}/${KDEMAINDIR}/share/mimelnk/application/*
+ chmod 0644 "${DESTDIR}/${KDEMAINDIR}/share/mimelnk/application/"*
fi
-if [ "${GNOMEDIR}" ]
-then
- echo Copying GNOME icons ..
- for i in `cd ${ICON_SOURCE_DIR}/hicolor; find ??x?? ???x??? -name "*.png"`
+if [ "${GNOMEDIR}" ]; then
+ echo "Copying GNOME icons..."
+ for i in `cd "${ICON_SOURCE_DIR}/hicolor"; find ??x?? ???x??? -name "*.png"`
do
- targetdir=${DESTDIR}/${GNOMEDIR}/share/icons/gnome/`dirname $i`
- mkdir -p $targetdir
- destfile=$targetdir/${ICON_PREFIX:-}${ICON_PREFIX:+-}`basename $i`
- cp ${ICON_SOURCE_DIR}/hicolor/$i $destfile
- chmod 0644 $destfile
+ targetdir=${DESTDIR}/${GNOMEDIR}/share/icons/gnome/`dirname ${i}`
+ mkdir -p "${targetdir}"
+ destfile=$targetdir/${ICON_PREFIX:-}${ICON_PREFIX:+-}`basename ${i}`
+ cp "${ICON_SOURCE_DIR}/hicolor/${i}" "${destfile}"
+ chmod 0644 "${destfile}"
done
+ unset targetdir destfile
- mkdir -p ${DESTDIR}/${GNOMEDIR}/share/mime-info
- cp openoffice.mime ${DESTDIR}/${GNOMEDIR}/share/mime-info/${PREFIX}.mime
- cp openoffice.keys ${DESTDIR}/${GNOMEDIR}/share/mime-info/${PREFIX}.keys
- chmod 0644 ${DESTDIR}/${GNOMEDIR}/share/mime-info/${PREFIX}.*
+ mkdir -p "${DESTDIR}/${GNOMEDIR}/share/mime-info"
+ cp openoffice.mime "${DESTDIR}/${GNOMEDIR}/share/mime-info/${PREFIX}.mime"
+ cp openoffice.keys "${DESTDIR}/${GNOMEDIR}/share/mime-info/${PREFIX}.keys"
+ chmod 0644 "${DESTDIR}/${GNOMEDIR}/share/mime-info/${PREFIX}".*
- mkdir -p ${DESTDIR}/${GNOMEDIR}/share/application-registry
- cp openoffice.applications ${DESTDIR}/${GNOMEDIR}/share/application-registry/${PREFIX}.applications
- chmod 0644 ${DESTDIR}/${GNOMEDIR}/share/application-registry/${PREFIX}.*
+ mkdir -p "${DESTDIR}/${GNOMEDIR}/share/application-registry"
+ cp openoffice.applications "${DESTDIR}/${GNOMEDIR}/share/application-registry/${PREFIX}.applications"
+ chmod 0644 "${DESTDIR}/${GNOMEDIR}/share/application-registry/${PREFIX}".*
fi
-mkdir -p ${DESTDIR}/usr/bin
+mkdir -p "${DESTDIR}/usr/bin"
-test -n "$OFFICE_PREFIX" && office_prefix="$OFFICE_PREFIX" || office_prefix=/opt
+test -n "${OFFICE_PREFIX}" && office_prefix="${OFFICE_PREFIX}" || office_prefix=/opt
office_root=${office_prefix}/${PREFIX}
#this symlink is needed to have the API boostrap functions running right
-ln -sf ${office_root}/program/soffice ${DESTDIR}/usr/bin/${PREFIX}
+ln -sf "${office_root}/program/soffice" "${DESTDIR}/usr/bin/${PREFIX}"
-cp printeradmin.sh ${DESTDIR}/usr/bin/${PREFIX}-printeradmin
-chmod 0755 ${DESTDIR}/usr/bin/${PREFIX} ${DESTDIR}/usr/bin/${PREFIX}-printeradmin
+cp printeradmin.sh "${DESTDIR}/usr/bin/${PREFIX}-printeradmin"
+chmod 0755 "${DESTDIR}/usr/bin/${PREFIX}" "${DESTDIR}/usr/bin/${PREFIX}-printeradmin"
if test "${PREFIX}" != libreoffice${PRODUCTVERSION} ; then
# compat symlinks
- mkdir -p ${DESTDIR}${office_prefix}
- ln -sf libreoffice${PRODUCTVERSION} ${DESTDIR}${office_root}
- ln -sf /usr/bin/${PREFIX} ${DESTDIR}/usr/bin/libreoffice${PRODUCTVERSION}
- ln -sf /usr/bin/${PREFIX}-printeradmin ${DESTDIR}/usr/bin/libreoffice${PRODUCTVERSION}-printeradmin
+ mkdir -p "${DESTDIR}${office_prefix}"
+ ln -sf libreoffice${PRODUCTVERSION} "${DESTDIR}${office_root}"
+ ln -sf /usr/bin/${PREFIX} "${DESTDIR}/usr/bin/libreoffice${PRODUCTVERSION}"
+ ln -sf /usr/bin/${PREFIX}-printeradmin "${DESTDIR}/usr/bin/libreoffice${PRODUCTVERSION}-printeradmin"
fi
-mkdir -p ${DESTDIR}/usr/share/mime/packages
-cp openoffice.org.xml ${DESTDIR}/usr/share/mime/packages/libreoffice${PRODUCTVERSION}.xml
-chmod 0644 ${DESTDIR}/usr/share/mime/packages/libreoffice${PRODUCTVERSION}.xml
+mkdir -p "${DESTDIR}/usr/share/mime/packages"
+cp openoffice.org.xml "${DESTDIR}/usr/share/mime/packages/libreoffice${PRODUCTVERSION}.xml"
+chmod 0644 "${DESTDIR}/usr/share/mime/packages/libreoffice${PRODUCTVERSION}.xml"
-mkdir -p ${DESTDIR}/usr/share/applications
+mkdir -p "${DESTDIR}/usr/share/applications"
for i in `cat launcherlist`; do
- ln -sf ${office_root}/share/xdg/$i ${DESTDIR}/usr/share/applications/${PREFIX}-$i
+ ln -sf "${office_root}/share/xdg/${i}" "${DESTDIR}/usr/share/applications/${PREFIX}-${i}"
done