diff options
author | Sachin Joshi <satchin.joshi@gmail.com> | 2019-06-23 03:25:50 +0000 |
---|---|---|
committer | Sachin Joshi <satchin.joshi@gmail.com> | 2019-06-23 03:25:50 +0000 |
commit | a0c65bbd6c708b555f457bf24ec07d2d41c3fe4a (patch) | |
tree | deb176014e3c1dcb87fba2fe1108e276c2100148 /lib/mix/tasks/pleroma/common.ex | |
parent | 1452a96ad6cfd7d250e3f7c10805994cc92016a7 (diff) | |
parent | 72f365df07e2eba75d3339629b01e5a8913513e6 (diff) | |
download | pleroma-a0c65bbd6c708b555f457bf24ec07d2d41c3fe4a.tar.gz |
Merge branch 'develop' into 'remove-avatar-header'
# Conflicts:
# CHANGELOG.md
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 |