t2linux / T2-Ubuntu

Ubuntu for T2 Macs
594 stars 52 forks source link

Make iso.sh Compatible with Both bash and sh #110

Closed dfaw20 closed 7 months ago

dfaw20 commented 7 months ago

Modified iso.sh to ensure compatibility with both bash and sh. The original script used bash-specific syntax that caused errors in sh. Changes were made to utilize cut and tr commands for string manipulation, avoiding bash-specific features.

Changes

Used cut to extract the first character of the flavour variable. Converted the first character to uppercase using tr. Concatenated the modified first character with the rest of the flavour string using cut.

Testing

Set the flavour variable (e.g., flavour="Ubuntu"). Execute with bash: bash iso.sh and verify correct output. Execute with sh: sh iso.sh and confirm the output matches the bash execution.

Related Issue

Fixes #109

Notes

The update removes bash-specific syntax for broader shell compatibility.