# HG changeset patch # User wenzelm # Date 1686832097 -7200 # Node ID 8b5a2e4b16d43ee78cf6d0815df95dbc061ec8c3 # Parent 403e4d9a37683e4b2718b45e9eef106851a0e259 tuned signature; diff -r 403e4d9a3768 -r 8b5a2e4b16d4 src/Pure/Admin/build_release.scala --- a/src/Pure/Admin/build_release.scala Wed Jun 14 17:20:05 2023 +0200 +++ b/src/Pure/Admin/build_release.scala Thu Jun 15 14:28:17 2023 +0200 @@ -318,7 +318,7 @@ """ val script_path = isabelle_target + Path.explode("lib/scripts/Isabelle_app") File.write(script_path, script) - File.set_executable(script_path, true) + File.set_executable(script_path) val component_dir = isabelle_target + Path.explode("contrib/Isabelle_app") Isabelle_System.move_file( @@ -744,7 +744,7 @@ val cygwin_bat = Path.explode("Cygwin-Setup.bat") File.write(isabelle_target + cygwin_bat, File.read(cygwin_template + cygwin_bat).replace("{MIRROR}", cygwin_mirror)) - File.set_executable(isabelle_target + cygwin_bat, true) + File.set_executable(isabelle_target + cygwin_bat) for (name <- List("isabelle/postinstall", "isabelle/rebaseall")) { val path = Path.explode(name) @@ -784,7 +784,7 @@ Bytes.write(context.dist_dir + isabelle_exe, Bytes.read(sfx_exe) + Bytes(sfx_txt) + Bytes.read(exe_archive)) - File.set_executable(context.dist_dir + isabelle_exe, true) + File.set_executable(context.dist_dir + isabelle_exe) } other_isabelle.cleanup() diff -r 403e4d9a3768 -r 8b5a2e4b16d4 src/Pure/Admin/component_cvc5.scala --- a/src/Pure/Admin/component_cvc5.scala Wed Jun 14 17:20:05 2023 +0200 +++ b/src/Pure/Admin/component_cvc5.scala Thu Jun 15 14:28:17 2023 +0200 @@ -53,7 +53,7 @@ Isabelle_System.make_directory(platform_dir) Isabelle_System.download_file(url, platform_exe, progress = progress) - File.set_executable(platform_exe, true) + File.set_executable(platform_exe) } diff -r 403e4d9a3768 -r 8b5a2e4b16d4 src/Pure/Admin/component_cygwin.scala --- a/src/Pure/Admin/component_cygwin.scala Wed Jun 14 17:20:05 2023 +0200 +++ b/src/Pure/Admin/component_cygwin.scala Thu Jun 15 14:28:17 2023 +0200 @@ -33,7 +33,7 @@ File.write(cygwin_isabelle + Path.explode("cygwin_mirror"), mirror) - File.set_executable(cygwin_exe, true) + File.set_executable(cygwin_exe) Isabelle_System.bash(File.bash_path(cygwin_exe) + " -h /dev/null").check val res = diff -r 403e4d9a3768 -r 8b5a2e4b16d4 src/Pure/Admin/component_sqlite.scala --- a/src/Pure/Admin/component_sqlite.scala Wed Jun 14 17:20:05 2023 +0200 +++ b/src/Pure/Admin/component_sqlite.scala Thu Jun 15 14:28:17 2023 +0200 @@ -72,7 +72,7 @@ Isabelle_System.copy_file(jar_dir + Path.explode(file), target) } - File.set_executable(component_dir.path + Path.explode("x86_64-windows/sqlitejdbc.dll"), true) + File.set_executable(component_dir.path + Path.explode("x86_64-windows/sqlitejdbc.dll")) } } diff -r 403e4d9a3768 -r 8b5a2e4b16d4 src/Pure/Admin/other_isabelle.scala --- a/src/Pure/Admin/other_isabelle.scala Wed Jun 14 17:20:05 2023 +0200 +++ b/src/Pure/Admin/other_isabelle.scala Thu Jun 15 14:28:17 2023 +0200 @@ -112,7 +112,7 @@ if (!ssh.is_file(dummy_stty_remote)) { ssh.make_directory(dummy_stty_remote.dir) ssh.write_file(dummy_stty_remote, dummy_stty) - ssh.set_executable(dummy_stty_remote, true) + ssh.set_executable(dummy_stty_remote) } try { bash( diff -r 403e4d9a3768 -r 8b5a2e4b16d4 src/Pure/General/file.scala --- a/src/Pure/General/file.scala Wed Jun 14 17:20:05 2023 +0200 +++ b/src/Pure/General/file.scala Thu Jun 15 14:28:17 2023 +0200 @@ -367,7 +367,7 @@ else path.file.canExecute } - def set_executable(path: Path, flag: Boolean): Unit = { + def set_executable(path: Path, flag: Boolean = false): Unit = { if (Platform.is_windows && flag) Isabelle_System.chmod("a+x", path) else if (Platform.is_windows) Isabelle_System.chmod("a-x", path) else path.file.setExecutable(flag, false) diff -r 403e4d9a3768 -r 8b5a2e4b16d4 src/Pure/General/ssh.scala --- a/src/Pure/General/ssh.scala Wed Jun 14 17:20:05 2023 +0200 +++ b/src/Pure/General/ssh.scala Thu Jun 15 14:28:17 2023 +0200 @@ -241,7 +241,7 @@ if (cmd.nonEmpty) run_sftp(cmd + " " + sftp_path(path)) } - override def set_executable(path: Path, flag: Boolean): Unit = + override def set_executable(path: Path, flag: Boolean = false): Unit = if (!execute("chmod a" + (if (flag) "+" else "-") + "x " + bash_path(path)).ok) { error("Failed to change executable status of " + quote(remote_path(path))) } @@ -402,7 +402,8 @@ def is_dir(path: Path): Boolean = path.is_dir def is_file(path: Path): Boolean = path.is_file def delete(path: Path): Unit = path.file.delete - def set_executable(path: Path, flag: Boolean): Unit = File.set_executable(path, flag) + def set_executable(path: Path, flag: Boolean = false): Unit = + File.set_executable(path, flag = flag) def make_directory(path: Path): Path = Isabelle_System.make_directory(path) def rm_tree(dir: Path): Unit = Isabelle_System.rm_tree(dir) def with_tmp_dir[A](body: Path => A): A = Isabelle_System.with_tmp_dir("tmp")(body) diff -r 403e4d9a3768 -r 8b5a2e4b16d4 src/Pure/Thy/export.scala --- a/src/Pure/Thy/export.scala Wed Jun 14 17:20:05 2023 +0200 +++ b/src/Pure/Thy/export.scala Thu Jun 15 14:28:17 2023 +0200 @@ -534,7 +534,7 @@ Isabelle_System.make_directory(path.dir) val bytes = entry.bytes if (!path.is_file || Bytes.read(path) != bytes) Bytes.write(path, bytes) - File.set_executable(path, entry.executable) + File.set_executable(path, flag = entry.executable) } } } diff -r 403e4d9a3768 -r 8b5a2e4b16d4 src/Pure/Tools/dotnet_setup.scala --- a/src/Pure/Tools/dotnet_setup.scala Wed Jun 14 17:20:05 2023 +0200 +++ b/src/Pure/Tools/dotnet_setup.scala Thu Jun 15 14:28:17 2023 +0200 @@ -136,7 +136,7 @@ progress.bash(script, echo = progress.verbose, cwd = if (dry_run) null else component_dir.path.file).check for (exe <- File.find_files(platform_dir.file, pred = _.getName.endsWith(".exe"))) { - File.set_executable(File.path(exe), true) + File.set_executable(File.path(exe)) } } } diff -r 403e4d9a3768 -r 8b5a2e4b16d4 src/Tools/VSCode/src/component_vscodium.scala --- a/src/Tools/VSCode/src/component_vscodium.scala Wed Jun 14 17:20:05 2023 +0200 +++ b/src/Tools/VSCode/src/component_vscodium.scala Thu Jun 15 14:28:17 2023 +0200 @@ -217,7 +217,7 @@ val name = file.getName File.is_dll(name) || File.is_exe(name) || File.is_node(name) }) - files.foreach(file => File.set_executable(File.path(file), true)) + files.foreach(file => File.set_executable(File.path(file))) Isabelle_System.bash("chmod -R o-w " + File.bash_path(dir)).check } }