[Libreoffice-commits] .: Branch 'libreoffice-3-4' - bin/distro-install-desktop-integration
Petr Mladek
pmladek at kemper.freedesktop.org
Wed Jul 27 05:55:17 PDT 2011
bin/distro-install-desktop-integration | 25 ++++++++++---------------
1 file changed, 10 insertions(+), 15 deletions(-)
New commits:
commit ffd8f826f7ee3db4d306ece5d1c2f8a8c4a033be
Author: Tomas Chvatal <scarabeus at gentoo.org>
Date: Wed Jul 27 14:52:21 2011 +0200
distro-install-desktop-integration: use "sed -i"
use the more elegant "sed -i" instead of "sed+mv"
Signed-off-by: Petr Mladek <pmladek at suse.cz>
diff --git a/bin/distro-install-desktop-integration b/bin/distro-install-desktop-integration
index 7a60629..8a3eb6b 100755
--- a/bin/distro-install-desktop-integration
+++ b/bin/distro-install-desktop-integration
@@ -84,13 +84,11 @@ cp -a sysui/desktop/share/create_tree.sh "$sysui_temp"
builddir=`pwd`
cd $sysui_temp
# we want non-versioned stuff in the distro packages
-for file in * ; do
- sed -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION_NODOT/\1/" \
- -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION/\1/" \
- -e "s/\($PRODUCTNAME\) $PRODUCTVERSION/\1/" \
- "$file" >"$file.new"
- mv "$file.new" "$file"
-done
+sed -i \
+ -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION_NODOT/\1/" \
+ -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION/\1/" \
+ -e "s/\($PRODUCTNAME\) $PRODUCTVERSION/\1/" \
+ *
# call in subshell to do not malfrom PRODUCTVERSION, ...
(
export OFFICE_PREFIX=$LIBDIR
@@ -118,13 +116,11 @@ fi
# we want non-versioned desktop files
cd $DESTDIR/$INSTALLDIR/share/xdg
# we want non-versioned stuff in the distro packages
-for file in *.desktop ; do
- sed -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION_NODOT/\1/" \
- -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION/\1/" \
- -e "s/\($PRODUCTNAME\) $PRODUCTVERSION/\1/" \
- "$file" >"$file.new"
- mv -f "$file.new" "$file"
-done
+sed -i \
+ -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION_NODOT/\1/" \
+ -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION/\1/" \
+ -e "s/\($PRODUCTNAME\) $PRODUCTVERSION/\1/" \
+ *.desktop
cd -
# put the stuff installed by create_tree.sh into the right file lists
@@ -178,4 +174,4 @@ sed -e "s|@INSTALLDIR@|$INSTALLDIR|g" bin/java-set-classpath.in >| "$DESTDIR$INS
chmod 755 "$DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/program/java-set-classpath"
test -f $DESTDIR/gid_Module_Root_Brand && echo "$INSTALLDIR/basis$PRODUCTVERSION/program/java-set-classpath" >>$DESTDIR/gid_Module_Root_Brand
-exit 0
\ No newline at end of file
+exit 0
More information about the Libreoffice-commits
mailing list