diff options
author | Mark Felder <feld@FreeBSD.org> | 2019-07-15 17:10:27 -0500 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2019-07-15 17:10:27 -0500 |
commit | ffb4eb9779ddd28ecee84c06e8dc58f4a4daaa38 (patch) | |
tree | b397d1192c69a7d089c86d41b6e09e89954ea798 /lib/mix/tasks/pleroma/common.ex | |
parent | e912f81c828cc7e1d2c0dff8daed3ad52f407a61 (diff) | |
parent | 03bcb40883dafa2886110e2b625c4cc5c21106f1 (diff) | |
download | pleroma-ffb4eb9779ddd28ecee84c06e8dc58f4a4daaa38.tar.gz |
Merge branch 'develop' into feature/matstodon-statuses-by-name
Diffstat (limited to 'lib/mix/tasks/pleroma/common.ex')
-rw-r--r-- | lib/mix/tasks/pleroma/common.ex | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/mix/tasks/pleroma/common.ex b/lib/mix/tasks/pleroma/common.ex deleted file mode 100644 index 48c0c1346..000000000 --- a/lib/mix/tasks/pleroma/common.ex +++ /dev/null @@ -1,28 +0,0 @@ -# Pleroma: A lightweight social networking server -# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/> -# SPDX-License-Identifier: AGPL-3.0-only - -defmodule Mix.Tasks.Pleroma.Common do - @doc "Common functions to be reused in mix tasks" - def start_pleroma do - Mix.Task.run("app.start") - end - - def get_option(options, opt, prompt, defval \\ nil, defname \\ nil) do - Keyword.get(options, opt) || - case Mix.shell().prompt("#{prompt} [#{defname || defval}]") do - "\n" -> - case defval do - nil -> get_option(options, opt, prompt, defval) - defval -> defval - end - - opt -> - opt |> String.trim() - end - end - - def escape_sh_path(path) do - ~S(') <> String.replace(path, ~S('), ~S(\')) <> ~S(') - end -end |