Mailinglist Archive: opensuse-packaging (250 mails)

< Previous Next >
Re: [opensuse-packaging] adding with sed?
  • From: "Sascha 'saigkill' Manns" <samannsml@xxxxxxxxxxxxx>
  • Date: Wed, 12 Aug 2009 14:58:08 +0200
  • Message-id: <200908121458.08228@xxxxxxxxxxxxxxxxxxx>
Am Mittwoch 12 August 2009 10:51:19 wrote Dominique Leuenberger:
On 8/12/2009 at 10:43, "Sascha 'saigkill' Manns"
<samannsml@xxxxxxxxxxxxx>

wrote:
Hello Mates,

i would like to add this in the End of
libs/toolkit/objects/tkSettings.cpp:
if (QDir("/usr/lib64/qt4/plugins").exists())
d->m_Enum_Path.insert( QtPlugInsPath,"/usr/lib64/qt4/plugins"
) ); else if (QDir("/usr/lib/qt4/plugins").exists())
d->m_Enum_Path.insert( QtPlugInsPath,"/usr/lib/qt4/plugins" )
); Can i do this with sed?

Hi,

Just for 'adding' those exact lines at the end of the file? I think
sed is a bit over the top for this. Simply use cat:
## example ##
cat >> libs/toolkit/objects/tkSettings.cpp <<EOF
if (QDir("/usr/lib64/qt4/plugins").exists())
d->m_Enum_Path.insert( QtPlugInsPath,"/usr/lib64/qt4/plugins" )
); else if (QDir("/usr/lib/qt4/plugins").exists())
d->m_Enum_Path.insert( QtPlugInsPath,"/usr/lib/qt4/plugins" ) );
EOF
## end example ##
Cool. Thanks for the hint :-)

--
Sincerely yours

Sascha Manns
openSUSE Ambassador
openSUSE Marketing Team
openSUSE Build Service
Web: http://saschamanns.gulli.to
Project-Blog: http://lizards.opensuse.org/author/saigkill
Private-Blog: http://saschasbacktrace.blogspot.com

--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >