IOS one-time add all files to SVN command, iossvn
I use terminal commands to use svn, but there are two troubles when using the terminal.
The first one is that you cannot add all files at a time. Finally, I found such a command on the Internet.
Svn st | awk '{if ($1 = "? ") {Print $2} '| xargs svn add
At first, I didn't know what it meant, so I felt quite helpful.
But this command cannot add an image file like home_image@2x.png, you need to add the "@" symbol behind the image
Today, because I want to upload a lot of images and it is inconvenient to add them one by one, I studied the awk command.
Finally, I understand that you only need to change the above command a little.
Svn st | awk '{if ($1 = "? ") {If (match ($0," @ ") {print $2" @ "} else {print $2 }}' | xargs svn add
Among them, match ($0, "@") is used to check that every row contains exactly @ others. It is different from the @ 2x.png file.
Record this and write it to yourself. Thank you for reprinting-LC