Clock
David Faure
dfaure at klaralvdalens-datakonsult.se
Fri Jun 27 10:40:17 BST 2003
On Friday 27 June 2003 11:34, Benjamin Meyer wrote:
> Id=KDE3.2
> Script=" \
> #!/bin/sh \
> config_dir=~/.kde/share/config/ \
This hardcoded path should rather be
kde-config --path config | sed -e 's/:.*//'
> for pkg in `find $config_dir -name 'clock_panelapplet_*' -maxdepth 1 | sort`;
Hum, isn't "ls -1 clock_panelapplet_*" simpler?
> do \
> filename=`basename $pkg` \
> sed 's/Tyle=Plain/Type=0/' filename \
> sed 's/Tyle=Digital/Type=1/' filename \
> sed 's/Tyle=Analog/Type=2/' filename \
> sed 's/Tyle=Fuzzy/Type=3/' filename \
sed doesn't work that way... Is it ok to use perl -pi -e?
Otherwise you need to redirect the output of sed to a new file (e.g. filename.tmp)...
Combine all the s/foo/bar/ using ";" between them. Use $ before filename ;)
Then mv -f $filename.tmp $filename.
--
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
More information about the kde-core-devel
mailing list