# HG changeset patch # User wenzelm # Date 1573469383 -3600 # Node ID d3ededaa77b34afaff6a8c400805c8569a84a4c4 # Parent a197532693a5d003be7e3bdb2f1b98a46737130b added "isabelle phabricator"; diff -r a197532693a5 -r d3ededaa77b3 src/Pure/System/isabelle_tool.scala --- a/src/Pure/System/isabelle_tool.scala Sat Nov 09 15:39:21 2019 +0000 +++ b/src/Pure/System/isabelle_tool.scala Mon Nov 11 11:49:43 2019 +0100 @@ -153,6 +153,7 @@ Options.isabelle_tool, Phabricator.isabelle_tool1, Phabricator.isabelle_tool2, + Phabricator.isabelle_tool3, Present.isabelle_tool, Profiling_Report.isabelle_tool, Server.isabelle_tool, diff -r a197532693a5 -r d3ededaa77b3 src/Pure/Tools/phabricator.scala --- a/src/Pure/Tools/phabricator.scala Sat Nov 09 15:39:21 2019 +0000 +++ b/src/Pure/Tools/phabricator.scala Mon Nov 11 11:49:43 2019 +0100 @@ -98,6 +98,41 @@ + /** command-line tools **/ + + /* Isabelle tool wrapper */ + + val isabelle_tool1 = + Isabelle_Tool("phabricator", "invoke command-line tool within Phabricator home directory", args => + { + var name = default_name + + val getopts = + Getopts(""" +Usage: isabelle phabricator [OPTIONS] COMMAND [ARGS...] + + Options are: + -n NAME Phabricator installation name (default: """ + quote(default_name) + """) + + Invoke a command-line tool within the home directory of the named Phabricator + installation. +""", + "n:" -> (arg => name = arg)) + + val more_args = getopts(args) + if (more_args.isEmpty) getopts.usage() + + val progress = new Console_Progress + + val config = get_config(name) + + if (!progress.bash(Bash.strings(more_args), cwd = config.home.file, echo = true).ok) { + error("Command failed") + } + }) + + + /** setup **/ def user_setup(name: String, description: String, ssh_setup: Boolean = false) @@ -327,7 +362,7 @@ /* Isabelle tool wrapper */ - val isabelle_tool1 = + val isabelle_tool2 = Isabelle_Tool("phabricator_setup", "setup Phabricator server on Ubuntu Linux", args => { var repo = "" @@ -436,7 +471,7 @@ /* Isabelle tool wrapper */ - val isabelle_tool2 = + val isabelle_tool3 = Isabelle_Tool("phabricator_setup_mail", "setup mail configuration for existing Phabricator server", args => {