[Lunar-commits] r17382 - moonbase/trunk/games/asteroids3D

Auke Kok sofar at foo-projects.org
Sat Nov 19 07:11:11 UTC 2005


Florin Braescu wrote:

>+  mv  texture.c texture.c.original                                           &&
>+  cat texture.c.original                                                      |
>+  sed "s/ast_tex0.ppm/\/usr\/share\/games\/asteroids3D\/ast_tex0.ppm/"        |
>+  sed "s/ast_tex1.ppm/\/usr\/share\/games\/asteroids3D\/ast_tex1.ppm/"        |
>+  sed "s/ast_tex2.ppm/\/usr\/share\/games\/asteroids3D\/ast_tex2.ppm/"        |
>+  sed "s/ast_tex3.ppm/\/usr\/share\/games\/asteroids3D\/ast_tex3.ppm/"        |
>+  sed "s/ast_tex4.ppm/\/usr\/share\/games\/asteroids3D\/ast_tex4.ppm/"        |
>+  sed "s/ast_tex5.ppm/\/usr\/share\/games\/asteroids3D\/ast_tex5.ppm/"        |
>  
>

you can replace this monster with this kitty:

sedit ":\(ast_tex[0-9].ppm\):/usr/share/games/asteroids3D/\1:" texture.c

>+  sed "s/nebula_tex0.ppm/\/usr\/share\/games\/asteroids3D\/nebula_tex0.ppm/"  |
>+  sed "s/nebula_tex1.ppm/\/usr\/share\/games\/asteroids3D\/nebula_tex1.ppm/"  |
>+  sed "s/nebula_tex2.ppm/\/usr\/share\/games\/asteroids3D\/nebula_tex2.ppm/"  |
>+  sed "s:contrib/nebula_tex3.ppm:/usr\/share\/games\/asteroids3D\/nebula_tex3.ppm:" |
>+  sed "s/torp_tex0.ppm/\/usr\/share\/games\/asteroids3D\/torp_tex0.ppm/" > texture.c
>  
>


rinse and repeat for the other 5 files.

Auke



More information about the Lunar-dev mailing list