Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code clean up - does policy_array in Setup-Your-Mac-via-Dialog.bash, still need to be a shell array? #39

Closed
wakco opened this issue Feb 23, 2023 · 2 comments
Assignees

Comments

@wakco
Copy link
Contributor

wakco commented Feb 23, 2023

Not really a bug or a feature, more just code clean up.

Loving the use of JavaScript via osascript to handle reading JSON content, however I noticed something that I assume is to be cleaned up at some point. I assume this is a hangover from a DEPNotify based script, but I am struggling to see a reason why policy_array is still a shell array when it only contains one long JSON formatted string.

Figured I'd log it here as a helpful reminder to clean up policy_array, as I haven't gone through enough of the script yet to consider creating a pull request that cleans this up.

@wakco wakco changed the title Code Clean up - does policy_array still need to be a shell array? Code clean up - does policy_array still need to be a shell array? Feb 23, 2023
@wakco wakco changed the title Code clean up - does policy_array still need to be a shell array? Code clean up - does policy_array in Setup Your Mac, still need to be a shell array? Feb 23, 2023
@wakco wakco changed the title Code clean up - does policy_array in Setup Your Mac, still need to be a shell array? Code clean up - does policy_array in Setup-Your-Mac-via-Dialog.bash, still need to be a shell array? Feb 23, 2023
@dan-snelson
Copy link
Owner

Thanks, @wakco; PRs are always welcome.

@dan-snelson dan-snelson added the waiting info On-hold, waiting information from requestor label Feb 28, 2023
wakco added a commit to wakco/dialog-scripts that referenced this issue Mar 3, 2023
Cleaned up the policy_array variable, as it was being set as an array from the days of DEPNotify and no longer needed to be, and since it is a JSON, renamed it to policyJSON, matching welcomeJSON. Ref: dan-snelson#39
Also added comments above the initial setting of policyJSON for how to reconfigure the script for sourcing the policy list from an external source. Ref: dan-snelson#43
@dan-snelson dan-snelson removed the waiting info On-hold, waiting information from requestor label Mar 3, 2023
@dan-snelson dan-snelson self-assigned this Mar 3, 2023
@wakco
Copy link
Contributor Author

wakco commented Mar 3, 2023

Thank you.

@wakco wakco closed this as completed Mar 3, 2023
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

No branches or pull requests

2 participants