Skip to content

Commit

Permalink
Fix execution-or-import check for windows
Browse files Browse the repository at this point in the history
`basename` did not handle windows paths
Fixes #10
  • Loading branch information
dfreedm committed Oct 3, 2013
1 parent 39ab4ac commit cceb30f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions bin/pull-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cceb30f

Please sign in to comment.