From cceb30f858d752e150660569f908ab5100a18f92 Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Thu, 3 Oct 2013 13:59:49 -0700 Subject: [PATCH] Fix execution-or-import check for windows `basename` did not handle windows paths Fixes #10 --- bin/pull-all.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/bin/pull-all.sh b/bin/pull-all.sh index 00d282ca7..c4b7a6914 100755 --- a/bin/pull-all.sh +++ b/bin/pull-all.sh @@ -2,13 +2,6 @@ # This script provides the repo configurations for Polymer's checkout scripts -# Check if cwd/tools/bin/pull-all exists, use that if it does -# this way, a random download of pull-all is always correct -# if [ "${0##*[/|\\]}" == "pull-all.sh" ] && [ -x "tools/bin/pull-all.sh" ] && ! [ "$0" -ef "tools/bin/pull-all.sh" ]; then - # echo "exec'ing more up-to-date copy" - # exec tools/bin/pull-all.sh "$@" -# fi - # Windows autocloses shell when complete, use `read` to wait for user input WINDOWS=0 if [[ $OSTYPE == win32 ]] || [[ $OSTYPE == cygwin ]]; then @@ -143,7 +136,7 @@ sync_repos() { } # only sync if run, not if importing functions -if [ `basename $0` == "pull-all.sh" ]; then +if [ ${0##*[/\\]} == "pull-all.sh" ]; then # figure out what branch to pull with the -v "version" argument while getopts ":v:" opt; do case $opt in