mix.exs: GNU sed doesn't into proper getopt()
This commit is contained in:
parent
23c6cea889
commit
99c2e8ed5c
1 changed files with 2 additions and 2 deletions
4
mix.exs
4
mix.exs
|
@ -346,7 +346,7 @@ defp add_copyright(_) do
|
||||||
|
|
||||||
find = "find lib test priv -type f \\( -name '*.ex' -or -name '*.exs' \\) -exec "
|
find = "find lib test priv -type f \\( -name '*.ex' -or -name '*.exs' \\) -exec "
|
||||||
grep = "grep -L '# Copyright' {} \\; |"
|
grep = "grep -L '# Copyright' {} \\; |"
|
||||||
xargs = "xargs -n1 sed -i '' '1s;^;#{template};'"
|
xargs = "xargs -n1 sed -i'' '1s;^;#{template};'"
|
||||||
|
|
||||||
:os.cmd(String.to_charlist("#{find}#{grep}#{xargs}"))
|
:os.cmd(String.to_charlist("#{find}#{grep}#{xargs}"))
|
||||||
end
|
end
|
||||||
|
@ -355,7 +355,7 @@ defp bump_copyright(_) do
|
||||||
year = NaiveDateTime.utc_now().year
|
year = NaiveDateTime.utc_now().year
|
||||||
find = "find lib test priv -type f \\( -name '*.ex' -or -name '*.exs' \\) |"
|
find = "find lib test priv -type f \\( -name '*.ex' -or -name '*.exs' \\) |"
|
||||||
|
|
||||||
xargs = "xargs sed -i '' 's/# Copyright © 2017-20[0-9][0-9]/# Copyright © 2017-#{year}/'"
|
xargs = "xargs sed -i'' 's/# Copyright © 2017-20[0-9][0-9]/# Copyright © 2017-#{year}/'"
|
||||||
|
|
||||||
:os.cmd(String.to_charlist("#{find}#{xargs}"))
|
:os.cmd(String.to_charlist("#{find}#{xargs}"))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue