Skip to content

Conversation

@zekefast
Copy link
Contributor

Overview

Improve Bash scripts. Clean up inefficiencies. Fix cloned repository URL and checkouted branch.

Changes

  • Change shebang for the following scripts:
    • append_doc_feature.sh
    • append_info.sh
    • build_relm_docs.sh
    • fix_ssh.sh
  • Change shell from #!/bin/sh to #!/usr/bin/env -S bash -euo pipefail for build_relm_docs.sh script. Bash is nicer to write.
  • Use DIRSTACK (i.e. pushd/popd) instead of cd based directory traversal.
  • Replace several mkdir calls with a single mkdir --parents call to create several directories at one run.
  • Save a bit of bandwidth and time by not cloning full history of the repository. Instead clone only last commit of the tip of each branch, hence --depth 1 --no-single-branch.
  • Replace repository URL of https://github.com/AaronErhardt/relm4 with https://github.com/Relm4/Relm4. It looks like the AaronErhardt/relm4 refer to some old repository and it doesn't exists anymore.
  • Replace checkout of stable branch with checkout of latest stable tag, e.g. v0.10.0. stable branch does not exist at Relm4/Relm4 repository anymore.

… bash -euo pipefail`.

New shebang reports more errors in scripts and `set -e` in it already.
So, no separate `set -e` in scripts' body is required.

Changes:
- Change shebang for the following scripts:
  - append_doc_feature.sh
  - append_info.sh
  - build_relm_docs.sh
  - fix_ssh.sh
- Change shell from `#!/bin/sh` to `#!/usr/bin/env -S bash -euo pipefail` for
  build_relm_docs.sh script. Bash is nicer to write it.
Changes:
- Use DIRSTACK (i.e. pushd/popd) instead of "cd" based directory
  traversal.
- Replace several "mkdir" calls with a single "mkdir --parents" call to
  create several directories at one run.
- Save a bit of bandwidth and time by not clonning full history of the
  repository. Instead clone only last commit of the tip of each branch,
  hence "--depth 1 --no-single-branch".
- Replace repository URL of https://github.com/AaronErhardt/relm4 with
  https://github.com/Relm4/Relm4. It looks like the AaronErhardt/relm4
  refer to some old repository and it doesn't exists anymore.
- Replace checkout of "stable" branch with checkout of latest stable
  tag, e.g. v0.10.0. "stable" branch does not exist at Relm4/Relm4
  repository anymore.
@zekefast zekefast self-assigned this Dec 29, 2025
@zekefast zekefast added documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code labels Dec 29, 2025
@zekefast zekefast merged commit 4ff622e into main Dec 29, 2025
0 of 2 checks passed
@zekefast zekefast deleted the improve_scripts branch December 29, 2025 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants