diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2011-07-27 14:52:21 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2011-08-23 20:28:19 +0200 |
commit | 1fceff3d256930815096b5c1267c3bf4dcb16226 (patch) | |
tree | 46326dacf64ae2e14cf5543d398fa8ced01095bb /bin | |
parent | 9602fbb21b5f838188b9b3e3a963cf520b845d57 (diff) |
distro-install-desktop-integration: use "sed -i"
use the more elegant "sed -i" instead of "sed+mv"
Signed-off-by: Petr Mladek <pmladek@suse.cz>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/distro-install-desktop-integration | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/bin/distro-install-desktop-integration b/bin/distro-install-desktop-integration index 5e1b59702e25..e4dd872ab7a3 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 |