-
Notifications
You must be signed in to change notification settings - Fork 37
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
Fix dev setup script #15
Fix dev setup script #15
Conversation
… functioning of Profile Manager on developer machines. This fixes #12
Yes, it's a great idea to make sure the |
# in the profile_apply script there is a hardcoded reference to utils.sh. sed will replace this a mac friendly url. | ||
# TODO: review this after system wide path related changes. | ||
if [[ "$OS" == 'Darwin' ]]; then | ||
sed 's/share/local\/opt/g' tools/profile_apply > "$bin_dir/buendia-profile-apply" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks scary... if the word share
appears anywhere in the script it will get changed. How about doing this logic in Python in profile_apply
, rather than using sed
to edit the Python code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right. I fixed it. Now it looks for /usr/share and replace for /usr/local/opt.
I added a TODO and created an issue #17 to remove the sudo request. |
# In the profile_apply script there is a hardcoded reference to utils.sh. sed will replace this a mac friendly url. | ||
# TODO: review this after system wide path related changes. | ||
if [[ "$OS" == 'Darwin' ]]; then | ||
sed 's/\/usr\/share/\/usr\/local\/opt/g' tools/profile_apply > "$bin_dir/buendia-profile-apply" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This execution is throwing tools/openmrs_setup: line 93: /usr/local/bin/buendia-profile-apply: Permission denied
Refactoring to sed 's/\/usr\/share/\/usr\/local\/opt/g' tools/profile_apply > sudo "$bin_dir/buendia-profile-apply"
worked fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Done.
Thank you @viniciusboson. All suggestions accepted and the script is updated. |
…-dev-setup-script Fix dev setup script
Added creation of files and folders and setting permissions to proper functioning of Profile Manager on developer machines.