You are not logged in.
Hi, i find sed being used in quite a few PKGBUILDs but i dont really understand what it does after see the the man page and stuff...
for example,
# Maintainer: Link Dupont <link@subpop.net>
# Contributor: Link Dupont <link@subpop.net>
pkgname=cedega
pkgver=4.4
tgrel=1
pkgrel=2
pkgdesc="Transgaming's flagship product, allowing Windows games to run on Linux"
url="http://www.transgaming.com/"
license="non-free"
depends=('x-server' 'python' 'pygtk')
install=
source=("${pkgname}_${pkgver}-$tgrel.i386.tgz" "point2play-small-2.0.1.tgz" "transgaming-fontinstaller-1.0.tgz" "cedega.sh" "transgaming-mozctlinstaller-1.0-1.i386.tgz" "http://downloads.transgaming.com/misc_d … pengl32.so")
build() {
cd $startdir/src
mkdir -p $startdir/pkg/opt/cedega $startdir/pkg/etc/profile.d
mv $startdir/src/usr/* $startdir/pkg/opt/cedega
sed -e "s|/usr|/opt/cedega|" -i $startdir/pkg/opt/cedega/bin/Point2Play
sed -e "s|/usr|/opt/cedega|" -i $startdir/pkg/opt/cedega/bin/cedega
sed -e "s|/usr|/opt/cedega|" -i $startdir/pkg/opt/cedega/bin/tg-font-install
sed -e "s|/usr|/opt/cedega|" -i $startdir/pkg/opt/cedega/bin/tg-mozctl-install
rm -rf $startdir/pkg/opt/cedega/share/gnome/
rm -rf $startdir/pkg/opt/cedega/share/icons/
rm -rf $startdir/pkg/opt/cedega/lib/menu
cp $startdir/src/cedega.sh $startdir/pkg/etc/profile.d/
# Apply hotfix that fixes OpenGL rendering in World of Warcraft
cp $startdir/src/libopengl32.so $startdir/pkg/opt/cedega/lib/transgaming_cedega/winex/lib/
}
md5sums=('20592555c86cae4f4638e69281b80a8d' '8c3a22d57b897ecc9c6ec82ec9df0c6b'
'9be0cf8bdd62658f46c52fdcba4be34e' '98078ba55a7f7f50750181adea924621'
'fdb94eadf8c681e7e84a8c8235562274' '56d6f04788bbf0355e309e2eff4f4b4d')
what exactly does sed do for example in this above PKGBUILD?
Offline
its substituting /opt/cedega/ in place of /usr/ in each of the files on the right.
s is substitue
| is the seperator
i is insert into file
e is execute these commands
Offline
AHH i see, thanks alot.
Offline
The man page for sed isn't very clear i think - it is worth learning how it works tho
Offline
cedega is a happy resident in /usr, there is no need to /opt it.
Offline