Skip to content

Non-working sed usage on macOS (GNU vs BSD sed) #85

Open
@MPV

Description

Describe the bug

The usage of sed in this template fails in macOS, i.e. with:

  • invalid command code v
  • No such file or directory

(see details below)

Steps to reproduce

  1. Generate a new repo based on this template.
  2. Run bash setup.bash (on a Mac).

Expected behavior

  1. [...]
  2. sed not giving warnings as below.

Screenshots

After confirmation, the `main` will be replaced with the generated
template using the above information. Please ensure all seems correct.
Type `yes` if you want to continue.
> yes

Switched to branch 'template'
Preparing worktree (detached HEAD 81a8d50)
HEAD is now at 81a8d50 Initial commit
Switched to a new branch 'out'
sed: 1: "/Users/vs/src/mpv/asdf- ...": invalid command code v
sed: \033[35m.gitlab-ci.yml\033[m: No such file or directory
sed: \033[35mREADME-github.md\033[m: No such file or directory
sed: \033[35mREADME-gitlab.md\033[m: No such file or directory
sed: \033[35mcontributing-github.md\033[m: No such file or directory
sed: \033[35mcontributing-gitlab.md\033[m: No such file or directory
setup.bash: line 111: lib/utils.bash.sed: No such file or directory
sed: \033[35mREADME-github.md\033[m: No such file or directory
sed: \033[35mREADME-gitlab.md\033[m: No such file or directory
setup.bash: line 111: lib/utils.bash.sed: No such file or directory
setup.bash: line 111: .github/workflows/build.yml.sed: No such file or directory
sed: \033[35m.gitlab-ci.yml\033[m: No such file or directory
sed: \033[35mREADME-github.md\033[m: No such file or directory
sed: \033[35mREADME-gitlab.md\033[m: No such file or directory
sed: \033[35mcontributing-github.md\033[m: No such file or directory
sed: \033[35mcontributing-gitlab.md\033[m: No such file or directory
setup.bash: line 111: lib/utils.bash.sed: No such file or directory
sed: \033[35mREADME-github.md\033[m: No such file or directory
sed: \033[35mREADME-gitlab.md\033[m: No such file or directory
sed: \033[35mREADME-github.md\033[m: No such file or directory
sed: \033[35mcontributing-github.md\033[m: No such file or directory
sed: \033[35mREADME-gitlab.md\033[m: No such file or directory
rm '.gitlab-ci.yml'
rm '.gitlab/issue_templates/Bug_Report.md'
rm '.gitlab/issue_templates/Feature_Request.md'
rm '.gitlab/merge_request_templates/Merge_Request.md'
rm 'README-gitlab.md'
rm 'contributing-gitlab.md'
[out (root-commit) 5072db0] Generate asdf-octopilot plugin from template.
 26 files changed, 441 insertions(+)
 create mode 100644 "\033[35m.gitlab-ci.yml\033[m.sed"
 create mode 100644 "\033[35mREADME-github.md\033[m.sed"
 create mode 100644 "\033[35mREADME-gitlab.md\033[m.sed"
 create mode 100644 "\033[35mcontributing-github.md\033[m.sed"
 create mode 100644 "\033[35mcontributing-gitlab.md\033[m.sed"
 create mode 100644 .editorconfig
 create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md
 create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md
 create mode 100644 .github/PULL_REQUEST/pull_request_template.md
 create mode 100644 .github/dependabot.yml
 create mode 100644 .github/workflows/build.yml
 create mode 100644 .github/workflows/lint.yml
 create mode 100644 .github/workflows/release.yml
 create mode 100644 .github/workflows/semantic-pr.yml
 create mode 100644 .tool-versions
 create mode 100644 LICENSE
 create mode 100644 README.md
 create mode 100755 bin/download
 create mode 100755 bin/install
 create mode 100755 bin/latest-stable
 create mode 100755 bin/list-all
 create mode 100644 contributing.md
 create mode 100755 lib/utils.bash
 create mode 100755 scripts/format.bash
 create mode 100755 scripts/lint.bash
 create mode 100644 version.txt
Switched to branch 'main'
Your branch and 'origin/main' have diverged,
and have 1 and 1 different commits each, respectively.
  (use "git pull" if you want to integrate the remote branch with yours)
All done.
Your main branch has been reset to an initial commit.
Push to origin/main with `git push --force-with-lease`
Review these TODO items:
[...]

Additional context

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions