@@ -192,10 +192,24 @@ object Archives {
192
192
file(f.getAbsolutePath + " .xz" )
193
193
}
194
194
195
- val makeTxz = makeTarball (xz, " .txz" ) _
196
- val makeTgz = makeTarball (gzip, " .tgz" ) _
195
+ val makeTxz = makeTarballWithOptions (xz, " .txz" ) _
196
+ val makeTgz = makeTarballWithOptions (gzip, " .tgz" ) _
197
197
198
198
/**
199
+ * Helper method used to construct tar-related compression functions with `--force-local` and `-pvcf` option specified
200
+ * as default.
201
+ * @param target folder to build package in
202
+ * @param name of output (without extension)
203
+ * @param mappings included in the output
204
+ * @param top level directory
205
+ * @return tar file
206
+ *
207
+ */
208
+ def makeTarball (compressor : File => File , ext : String )(target : File , name : String , mappings : Seq [(File , String )], top : Option [String ]): File =
209
+ makeTarballWithOptions(compressor, ext)(target, name, mappings, top, options = Seq (" --force-local" , " -pcvf" ))
210
+
211
+
212
+ /**
199
213
* Helper method used to construct tar-related compression functions.
200
214
* @param target folder to build package in
201
215
* @param name of output (without extension)
@@ -205,7 +219,7 @@ object Archives {
205
219
* @return tar file
206
220
*
207
221
*/
208
- def makeTarball (compressor : File => File , ext : String )(target : File , name : String , mappings : Seq [(File , String )], top : Option [String ], options : Seq [String ]): File = {
222
+ def makeTarballWithOptions (compressor : File => File , ext : String )(target : File , name : String , mappings : Seq [(File , String )], top : Option [String ], options : Seq [String ]): File = {
209
223
val relname = name
210
224
val tarball = target / (name + ext)
211
225
IO .withTemporaryDirectory { f =>
0 commit comments