Skip to content

Make buildenv portable for bash compatibility#34

Merged
HarithaIBM merged 1 commit intomainfrom
portable-buildenv
May 1, 2026
Merged

Make buildenv portable for bash compatibility#34
HarithaIBM merged 1 commit intomainfrom
portable-buildenv

Conversation

@MikeFultonDev
Copy link
Copy Markdown
Contributor

This PR makes the buildenv file compatible with both bash (used on desktop systems) and UNIX System Services 'sh' (used on z/OS).

Changes

  1. Added return statements to functions - Functions in buildenv now include explicit return statements, allowing the file to be sourced by bash without errors. Previously, the buildenv could only be sourced by z/OS USS 'sh'.

  2. Added .zdx.json to .gitignore - The .zdx.json file contains user-specific configuration and should not be tracked in version control.

Benefits

  • Enables desktop-based port development workflow using localzopen commands
  • Allows developers to source buildenv on their local machines for testing
  • Maintains full compatibility with z/OS USS 'sh'
  • Improves developer experience for zopen port contributors

Testing

Verified that buildenv can now be sourced successfully on macOS with bash:

source ./buildenv  # No errors

@MikeFultonDev MikeFultonDev self-assigned this Apr 30, 2026
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Apr 30, 2026

🤖 Augment PR Summary

Summary: Updates buildenv so it can be sourced under both bash and z/OS USS sh by making the suite3270 symlink refresh idempotent and ensuring the empty hook functions return cleanly.
Also: Adds .zdx.json to .gitignore to avoid committing user-specific configuration.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread buildenv
rm "suite3270-${C3270_VERSION}-src"
ln -s "suite3270-${C3270_SVERSION}" "suite3270-${C3270_VERSION}-src"
rm -f "suite3270-${C3270_VERSION}-src"
ln -sfn "suite3270-${C3270_SVERSION}" "suite3270-${C3270_VERSION}-src"
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 30, 2026

Choose a reason for hiding this comment

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

ln -sfn relies on the non-POSIX -n flag, which may not be available on all ln implementations (potentially including some USS setups); if unsupported, sourcing/running buildenv will fail at this step.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@HarithaIBM HarithaIBM merged commit 0a4c774 into main May 1, 2026
0 of 2 checks passed
@HarithaIBM HarithaIBM deleted the portable-buildenv branch May 1, 2026 02:57
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