src/Pure/System/isabelle_system.scala
changeset 73624 f033d4f661e9
parent 73611 cc36841eeff6
child 73650 9ce115baaa4f
equal deleted inserted replaced
73618:4b413b78cd94 73624:f033d4f661e9
   529 
   529 
   530   def gnutar(
   530   def gnutar(
   531     args: String,
   531     args: String,
   532     dir: Path = Path.current,
   532     dir: Path = Path.current,
   533     original_owner: Boolean = false,
   533     original_owner: Boolean = false,
       
   534     strip: Int = 0,
   534     redirect: Boolean = false): Process_Result =
   535     redirect: Boolean = false): Process_Result =
   535   {
   536   {
   536     val options =
   537     val options =
   537       (if (dir.is_current) "" else "-C " + File.bash_path(dir) + " ") +
   538       (if (dir.is_current) "" else "-C " + File.bash_path(dir) + " ") +
   538       (if (original_owner) "" else "--owner=root --group=staff ")
   539       (if (original_owner) "" else "--owner=root --group=staff ") +
       
   540       (if (strip <= 0) "" else "--strip-components=" + strip + " ")
   539 
   541 
   540     if (gnutar_check) bash("tar " + options + args, redirect = redirect)
   542     if (gnutar_check) bash("tar " + options + args, redirect = redirect)
   541     else error("Expected to find GNU tar executable")
   543     else error("Expected to find GNU tar executable")
   542   }
   544   }
   543 
   545