Skip to content

Commit cceb30f

Browse files
committed
Fix execution-or-import check for windows
`basename` did not handle windows paths Fixes #10
1 parent 39ab4ac commit cceb30f

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

bin/pull-all.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22

33
# This script provides the repo configurations for Polymer's checkout scripts
44

5-
# Check if cwd/tools/bin/pull-all exists, use that if it does
6-
# this way, a random download of pull-all is always correct
7-
# if [ "${0##*[/|\\]}" == "pull-all.sh" ] && [ -x "tools/bin/pull-all.sh" ] && ! [ "$0" -ef "tools/bin/pull-all.sh" ]; then
8-
# echo "exec'ing more up-to-date copy"
9-
# exec tools/bin/pull-all.sh "$@"
10-
# fi
11-
125
# Windows autocloses shell when complete, use `read` to wait for user input
136
WINDOWS=0
147
if [[ $OSTYPE == win32 ]] || [[ $OSTYPE == cygwin ]]; then
@@ -143,7 +136,7 @@ sync_repos() {
143136
}
144137

145138
# only sync if run, not if importing functions
146-
if [ `basename $0` == "pull-all.sh" ]; then
139+
if [ ${0##*[/\\]} == "pull-all.sh" ]; then
147140
# figure out what branch to pull with the -v "version" argument
148141
while getopts ":v:" opt; do
149142
case $opt in

0 commit comments

Comments
 (0)