Skip to content

Commit 00ce10d

Browse files
csuterCopybara-Service
authored andcommitted
Support relative wheel file output path in pip_pkg.sh
PiperOrigin-RevId: 205900664
1 parent 4a6cc02 commit 00ce10d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pip_pkg.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ if [[ $# -lt 1 ]] ; then
2525
fi
2626

2727
# Create the destination directory, then do dirname on a non-existent file
28-
# inside it to give us an absolute paths with tilde characters resolved to the
29-
# destination directory. Readlink -f is a cleaner way of doing this but is not
30-
# available on a fresh macOS install.
28+
# inside it to give us a path with tilde characters resolved (readlink -f is
29+
# another way of doing this but is not available on a fresh macOS install).
30+
# Finally, use cd and pwd to get an absolute path, in case a relative one was
31+
# given.
3132
mkdir -p "$1"
32-
DEST="$(dirname "${1}/does_not_exist")"
33+
DEST=$(dirname "${1}/does_not_exist")
34+
DEST=$(cd "$DEST" && pwd)
3335

3436
cd bazel-bin/pip_pkg.runfiles/tensorflow_probability
3537
# Pass through remaining arguments (following the first argument, which

0 commit comments

Comments
 (0)