Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add retina images to svn

Tags:

ios

svn

iphone

I need to help for you.

I made images for retina display like "****@2x.png". but it can not add to svn like this.

******-no-iMac-2:baz shunter$ svn add retina_images/[email protected]
svn: warning: 'retina_images/foo' not found

I know how to add resource each like this.

******-no-iMac-2:baz shunter$ svn add retina_images/[email protected]@
A  (bin)  retina_images/[email protected]

but I made many images, so I feel so bad to do this way.

I really want to know how to add like this.

******-no-iMac-2:baz shunter$ svn add retina_images/bar/*.png

Please help!!

like image 500
Shunter1112 Avatar asked Jul 16 '10 06:07

Shunter1112


2 Answers

http://developers.enormego.com/view/add_2x_ios4_resources_svn

This is due to internal path recognizers in SVN. It expects the last at symbol to specify a revision. This is easily corrected by adding an at symbol to the end of your file:

$ svn add [email protected]@
A (bin) [email protected]

By Shuan (not me:)

like image 75
superarts.org Avatar answered Sep 30 '22 18:09

superarts.org


The svn command interprets the @ as an attempt to specify an SVN revision number (@REV format), so...

To add a single file:

svn add [email protected]@

Now svn sees the final @ as the @REV specifier instead of the first one.

To add multiple files: (each with the @ symbol added to the end of the file-name)

ls *2x.png | xargs -I x svn add x@

This lists *2x.png which will list all your retina images (in the current directory) and the output goes through xargs, which executes the svn add command for each file. The -I x tells xargs to replace 'x' with the file-name, so svn add x@ becomes the correct file-name with the '@' symbol added to the end.

like image 24
jhabbott Avatar answered Sep 30 '22 20:09

jhabbott