-
Notifications
You must be signed in to change notification settings - Fork 39.3k
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
change the current dir to the config dir #7209
Conversation
@erictune assigning to you, please reassign as you wish |
@resouer @WIZARD-CXY can one of you review this, and I'll merge if either of you say it looks good. |
I think we don't need it in our approach @resouer.Because the directory will be totally different. |
@WIZARD-CXY Always make sure current script is usable until #5498 is merged, although this file will be deprecated in the future, we still need consider this change this time. |
Ok, I'm just saying it won't be needed in the new approach and I am busy working on updating #5498 you reviewed it and say LGTM, I'll be ok with it |
@you-n-g I added comment, please consider it. |
@@ -21,6 +21,10 @@ | |||
|
|||
set -e | |||
|
|||
CONFIG_DIR=`dirname "$0"` | |||
CONFIG_DIR=`cd "$CONFIG_DIR"; pwd` |
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.
Does line 25 really needed? Although dirname
returns ./ubuntu-cluster
, but cd CONFIG_DIR
can also works as you expected.
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.
Line 25 will change the path to a full path.
Indeed it makes no difference here between full path and relative path so far. You can disgard that line when merging.
I just habitually do that in my own scripts.
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.
Em ... I'm not against that, just keep it. Would u please add comments to your change and then squash to one commit? And then we can ship it.
Otherwise the script can't run in other dirs.
@resouer I added comment by amending and pushed just now. :) |
@erictune LGTM plz ship it whenever you have time, thanks |
change the current dir to the config dir
Otherwise the script can't run in other dirs.