Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Dne 4.8.2011 22:06, Philipp Weissenbacher napsal(a):
Hi!
You probably forgot to attach your patch ;-).

Philipp

On Tuesday, 2 August 2011, Tomas Chvatal<tchvatal@novell.com>  wrote:

Yep,
you are right, I sent it off this thread so it is best to reattach again :)

Cheers

Tom

From 7d855f87054340bf83f822d4ec10222af3f2bae2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tomas.chvatal@gmail.com>
Date: Mon, 1 Aug 2011 15:14:46 +0200
Subject: [PATCH] Fix quoting in create_tree so distdir can have spaces in it.

---
 sysui/desktop/share/create_tree.sh |   89 ++++++++++++++++++------------------
 1 files changed, 45 insertions(+), 44 deletions(-)

diff --git a/sysui/desktop/share/create_tree.sh b/sysui/desktop/share/create_tree.sh
index 3c4a678..8f74787 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
-  
-  mkdir -p ${DESTDIR}/${KDEMAINDIR}/share/mimelnk/application
+  unset targetdir destfile
+
+  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
-  
-  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}.*
+  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/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
 
-- 
1.7.3.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.