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
[minor] Non-silenced pushd
followed by popd
in tensorflow/configure
#6555
Comments
@aselle looks like you added the lines in question? I believe this would be a sanity check, just making sure we are at the root. |
done
…On Wed, Dec 28, 2016 at 11:20 PM gunan ***@***.***> wrote:
@aselle <https://github.com/aselle> looks like you added the lines in
question?
I believe this would be a sanity check, just making sure we are at the
root.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6555 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAT52uw5qZBa5nQq04cAnDuRb_9K6rWhks5rM19IgaJpZM4LXZRG>
.
|
The SOURCE_BASE_DIR=`pwd -P`
pushd ${PWD} >/dev/null
cd `dirname $0`
#
# Perform some actions in the directory where 'configure' is
#
popd >/dev/null
#
# Perform some actions in the directory where the scipt was called from
# |
I'm confused. That code does seems to have an extra line and capture SOURCE_BASE_DIR of where you run it from rather than where configure is. |
@aselle That what the original script was doing -- I assumed it was on purpose -- the only reason it would be required is if there are two different locations that the script would have to work with: one where #!/usr/bin/env bash
set -e
set -o pipefail
SOURCE_BASE_DIR=`pwd -P` I was trying to see the
|
@zafartahirov I think for using tensorflow as is, you have a point. However, when tensorflow is an external dependency, such as how tensorflow/models or tensorflow/serving use TF, I believe users may need to run Also, as the pushd/popd lines have a comment describing what they do, I do not see a problem in terms of code readability. Therefore, I am inclined to close this issue. Let me know if the above explanations do not address your concerns. We can reopen the issue if you disagree with my assessment above. |
tensorflow/configure
has the following lines:I am not sure what is the purpose of the
pushd
followed bypopd
without change in directory. I think this is not necessary, and distracts when reading the source codes. Unless it is allowed to run theconfigure
from the directory other than the tensorflow root, it is completely redundant.Also, the
> /dev/null
is commented out which causes the current directory to print when running the script:The text was updated successfully, but these errors were encountered: