* Export/import many paths in one go.
This commit is contained in:
		
							parent
							
								
									9da367b7d5
								
							
						
					
					
						commit
						0db450024d
					
				
					 1 changed files with 8 additions and 3 deletions
				
			
		|  | @ -625,7 +625,11 @@ static void opExport(Strings opFlags, Strings opArgs) | |||
|         else throw UsageError(format("unknown flag `%1%'") % *i); | ||||
| 
 | ||||
|     FdSink sink(STDOUT_FILENO); | ||||
|     store->exportPath(*opArgs.begin(), sign, sink); | ||||
|     for (Strings::iterator i = opArgs.begin(); i != opArgs.end(); ++i) { | ||||
|         writeInt(1, sink); | ||||
|         store->exportPath(*i, sign, sink); | ||||
|     } | ||||
|     writeInt(0, sink); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -635,6 +639,7 @@ static void opImport(Strings opFlags, Strings opArgs) | |||
|     if (!opArgs.empty()) throw UsageError("no arguments expected"); | ||||
|      | ||||
|     FdSource source(STDIN_FILENO); | ||||
|     while (readInt(source) == 1) | ||||
|         cout << format("%1%\n") % store->importPath(false, source); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue