Skip to content

Shellcheck tweaks to migrate.sh#151

Closed
givensuman wants to merge 1 commit intoUltramarine-Linux:mainfrom
givensuman:main
Closed

Shellcheck tweaks to migrate.sh#151
givensuman wants to merge 1 commit intoUltramarine-Linux:mainfrom
givensuman:main

Conversation

@givensuman
Copy link

@givensuman givensuman commented Feb 26, 2026

Hello! I was copying your guys' migrate.sh for my own project and noticed it wasn't passing shellcheck.
These are just string splitting warnings, but I also noticed an inconsistency in warning messages formatted with "-->" and "[!]"

echo " ...[2/3] Terra"
if [ "$(rpm -qa terra-release | head -c1 | wc -c)" -eq 0 ]; then
trace sudo dnf install -y --repofrompath 'terra,https://repos.fyralabs.com/terra$releasever' --setopt="terra.gpgkey=https://repos.fyralabs.com/terra$releasever/key.asc" terra-release
trace sudo dnf install -y --repofrompath "terra,https://repos.fyralabs.com/terra$releasever" --setopt="terra.gpgkey=https://repos.fyralabs.com/terra$releasever/key.asc" terra-release
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. The shell would end up expanding this instead of DNF (the latter is necessary). Shellcheck does not have the context for this.

echo " ...[3/3] Ultramarine Repositories"
if [ "$(rpm -qa ultramarine-repos-common | head -c1 | wc -c)" -eq 0 ]; then
trace sudo dnf install -y --repofrompath 'ultramarine,https://repos.fyralabs.com/um$releasever' --setopt="ultramarine.gpgkey=https://repos.fyralabs.com/um$releasever/key.asc" ultramarine-repos-common
trace sudo dnf install -y --repofrompath "ultramarine,https://repos.fyralabs.com/um$releasever" --setopt="ultramarine.gpgkey=https://repos.fyralabs.com/um$releasever/key.asc" ultramarine-repos-common
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

@givensuman givensuman closed this Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants