Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
export DOTNET_MULTILEVEL_LOOKUP=0
export NUGET_PACKAGES="$SCRIPT_ROOT/packages/"

"$SCRIPT_ROOT/init-tools.sh"
. "$SCRIPT_ROOT/init-tools.sh"
Copy link
Member

Choose a reason for hiding this comment

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

Does it work to use the actual source "$DIR/common/_prettyprint.sh" command? That seems more obvious to me when reading the code than trying to see that little ..

Copy link
Member Author

Choose a reason for hiding this comment

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

source isn't part of POSIX, so . is in theory more portable.

Copy link
Member

@eerhardt eerhardt Oct 16, 2017

Choose a reason for hiding this comment

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

We have #!/bin/bash at the top...

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, more real than I thought: dash apparently doesn't support source. https://stackoverflow.com/a/13702876 https://wiki.ubuntu.com/DashAsBinSh#source

Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member Author

@dagood dagood Oct 16, 2017

Choose a reason for hiding this comment

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

(Whoops, didn't refresh and missed your comment.)

You're right that we do have that direct dependency on bash right now, and it would be ok to use source. A while back someone pointed out some bashisms in BuildTools and I think CoreFX. I've pointed out obvious ones like [[ since then (in PRs), but I don't know if there's a higher-level drive to avoid a bash dependency.

Copy link
Member

Choose a reason for hiding this comment

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

Right now we are definitely dependent on bash.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll go ahead and change it to source then--the readability concern also came up in the CoreFX PR. It's not like this would be hard to spot/fix if we do want to work on non-bash.


CLIPATH="$SCRIPT_ROOT/Tools/dotnetcli"
SDKPATH="$CLIPATH/sdk/$SDK_VERSION"
Expand Down