Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
redox
redox
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 204
    • Issues 204
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 5
    • Merge Requests 5
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • redox-os
  • redoxredox
  • Issues
  • #1275

Closed
Open
Opened Dec 02, 2019 by wucke13@wucke13
  • Report abuse
  • New issue
Report abuse New issue

bootstraph.sh shebang not optimal

The shebang should be #!/usr/bin/env bash. For a reasoning just refer to https://stackoverflow.com/questions/10376206/what-is-the-preferred-bash-shebang. I think this issue has been discussed sufficiently for endless projects, please just note that both /bin/bash and /usr/bin/bash are not guaranteed to work (and indeed don't work on some Linux distributions), thus the only and best shebang for maximum compatibility is #!/usr/bin/env bash.

This seems to affect a bunch of different files in Redox. The following list includes files, which use a wrong shebang (changing the shebang for things which run in docker is not necessarily useful, but helps keeping everything tidy):

  • docker/Dockerfile
  • redox/bootstrap.sh
  • redox/docker/Dockerfile
  • redox/relibc/ci.sh
  • redox/relibc/core_io/build-src.sh
  • redox/relibc/core_io/doc.sh
  • redox/relibc/core_io/edit-patches.sh
  • redox/relibc/core_io/functions.sh
  • redox/relibc/core_io/publish.sh
  • redox/cookbook/recipes/bash/recipe.sh
  • redox/cookbook/recipes/ca-certificates/make-ca.sh.patch
  • redox/cookbook/patches/nix/ci/install.sh
  • redox/cookbook/patches/nix/ci/script.sh
  • redox/rust/src/etc/cpu-usage-over-time-plot.sh
  • redox/rust/src/ci/run.sh
  • redox/rust/src/bootstrap/dist.rs
  • redox/rust/src/ci/scripts/checkout-submodules.sh
  • redox/rust/src/ci/scripts/collect-cpu-stats.sh
  • redox/rust/src/ci/scripts/disable-git-crlf-conversion.sh
  • redox/rust/src/ci/scripts/dump-environment.sh
  • redox/rust/src/ci/scripts/enable-docker-ipv6.sh
  • redox/rust/src/ci/scripts/install-awscli.sh
  • redox/rust/src/ci/scripts/install-clang.sh
  • redox/rust/src/ci/scripts/install-mingw.sh
  • redox/rust/src/ci/scripts/install-msys2-packages.sh
  • redox/rust/src/ci/scripts/install-msys2.sh
  • redox/rust/src/ci/scripts/install-innosetup.sh
  • redox/rust/src/ci/scripts/install-ninja.sh
  • redox/rust/src/ci/scripts/install-sccache.sh
  • redox/rust/src/ci/scripts/install-wix.sh
  • redox/rust/src/ci/scripts/run-build-from-ci.sh
  • redox/rust/src/ci/scripts/should-skip-this.sh
  • redox/rust/src/ci/scripts/switch-xcode.sh
  • redox/rust/src/ci/scripts/upload-artifacts.sh
  • redox/rust/src/ci/scripts/verify-line-endings.sh
  • redox/rust/src/ci/scripts/windows-symlink-build-dir.sh
  • redox/rust/src/tools/build-manifest/README.md
  • redox/rust/src/test/run-make/git_clone_sha1.sh
  • redox/rust/src/ci/docker/dist-various-2/build-cloudabi-toolchain.sh
  • redox/rust/src/ci/docker/dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh
  • redox/rust/src/ci/docker/mingw-check/validate-toolstate.sh
  • redox/rust/src/ci/docker/scripts/android-start-emulator.sh
  • redox/rust/src/ci/docker/scripts/freebsd-toolchain.sh

Please consider changing the shebang wherever applicable (and never use /usr/bin or /bin/ as prefix for binaries in general, if not absolutely necessary). The reason why the $PATH variable exists is just to make rm work, regardless on which system you are ;)

To find all files with the issue, grep -R '#.*/bash' should be sufficient.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: redox-os/redox#1275