Giter Site home page Giter Site logo

Comments (3)

remi avatar remi commented on May 9, 2024 1

Thanks for the report @hyperspace01 — it should be fixed now.

Don’t hesitate to open more issues related to using the script on Linux! 😅 👌

from elixir-boilerplate.

remi avatar remi commented on May 9, 2024

Hi @hyperspace01,

That’s weird, it doesn’t seem to be renaming directories $paths before $files 🤔 There should be a few mkdir commands before the mv ones.

If I run it on my machine (macOS), it works (the end result is OK) but I still see some errors.

▶ Replacing boilerplate identifiers in file and directory paths
mkdir ./test/foo_bar
mkdir ./test/foo_bar_web
mkdir ./lib/foo_bar_graphql
mkdir: ./lib/foo_bar_graphql: File exists
mkdir ./lib/foo_bar_health
mkdir ./lib/foo_bar
mkdir ./lib/foo_bar_web
mv ./lib/elixir_boilerplate_graphql/elixir_boilerplate_graphql.ex ./lib/foo_bar_graphql/foo_bar_graphql.ex
mv ./lib/elixir_boilerplate_health/elixir_boilerplate_health.ex ./lib/foo_bar_health/foo_bar_health.ex
mv ./lib/elixir_boilerplate.ex ./lib/foo_bar.ex
mv ./test/elixir_boilerplate/factory_test.exs ./test/elixir_boilerplate/gettext_interpolation_test.exs ./test/foo_bar
rm -rf ./test/elixir_boilerplate
mv ./test/elixir_boilerplate_web/errors ./test/elixir_boilerplate_web/errors_test.exs ./test/elixir_boilerplate_web/health_test.exs ./test/elixir_boilerplate_web/home ./test/elixir_boilerplate_web/ping_test.exs ./test/foo_bar_web
rm -rf ./test/elixir_boilerplate_web
mv ./lib/elixir_boilerplate_graphql/application ./lib/elixir_boilerplate_graphql/middleware ./lib/elixir_boilerplate_graphql/plugs ./lib/elixir_boilerplate_graphql/router.ex ./lib/elixir_boilerplate_graphql/schema.ex ./lib/foo_bar_graphql
mv: rename ./lib/elixir_boilerplate_graphql/middleware to ./lib/foo_bar_graphql/middleware: Directory not empty
rm -rf ./lib/elixir_boilerplate_graphql
mv ./lib/elixir_boilerplate_health/router.ex ./lib/foo_bar_health
rm -rf ./lib/elixir_boilerplate_health
mv ./lib/elixir_boilerplate/application.ex ./lib/elixir_boilerplate/config.ex ./lib/elixir_boilerplate/gettext.ex ./lib/elixir_boilerplate/release.ex ./lib/elixir_boilerplate/repo.ex ./lib/foo_bar
rm -rf ./lib/elixir_boilerplate
mv ./lib/elixir_boilerplate_web/endpoint.ex ./lib/elixir_boilerplate_web/errors ./lib/elixir_boilerplate_web/home ./lib/elixir_boilerplate_web/layouts ./lib/elixir_boilerplate_web/plugs ./lib/elixir_boilerplate_web/router.ex ./lib/elixir_boilerplate_web/socket.ex ./lib/foo_bar_web
rm -rf ./lib/elixir_boilerplate_web
▶ Done!

Could you run this command in a sh shell (in a fresh repo clone):

> sh
$ snakeCaseBefore="elixir_boilerplate"
$ paths=$(find . -depth 2 \( \
  -path "./lib/${snakeCaseBefore}" -or \
  -path "./lib/${snakeCaseBefore}_*" -or \
  -path "./test/${snakeCaseBefore}" -or \
  -path "./test/${snakeCaseBefore}_*" \
\))
$ echo $paths

What is the output?

Thank you! ❤️

from elixir-boilerplate.

sylvester-roos avatar sylvester-roos commented on May 9, 2024

Sure thing.

$ sh
sh-5.1$ snakeCaseBefore="elixir_boilerplate"
sh-5.1$ paths=$(find . -depth 2 \( \
  -path "./lib/${snakeCaseBefore}" -or \
  -path "./lib/${snakeCaseBefore}_*" -or \
  -path "./test/${snakeCaseBefore}" -or \
  -path "./test/${snakeCaseBefore}_*" \
\))
find: paths must precede expression: `2'
sh-5.1$ echo $paths

from elixir-boilerplate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.