cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Grieve (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-6383) copy-www-build-step.sh is missing a path separator in the destination
Date Thu, 03 Apr 2014 16:24:15 GMT

    [ https://issues.apache.org/jira/browse/CB-6383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13958928#comment-13958928
] 

Andrew Grieve commented on CB-6383:
-----------------------------------

I'm not seeing this on my machine. I added
{code}
  echo "MKDIR: $DST_DIR  $subpath"
{code}

and it shows: 

{quote}
MKDIR: /Users/agrieve/git/cordova/mobilespec/platforms/ios/build/emulator/mobilespec.app/www
MKDIR: /Users/agrieve/git/cordova/mobilespec/platforms/ios/build/emulator/mobilespec.app/www
 /accelerometer
MKDIR: /Users/agrieve/git/cordova/mobilespec/platforms/ios/build/emulator/mobilespec.app/www
 /audio
MKDIR: /Users/agrieve/git/cordova/mobilespec/platforms/ios/build/emulator/mobilespec.app/www
 /autotest
MKDIR: /Users/agrieve/git/cordova/mobilespec/platforms/ios/build/emulator/mobilespec.app/www
 /autotest/html
MKDIR: /Users/agrieve/git/cordova/mobilespec/platforms/ios/build/emulator/mobilespec.app/www
 /autotest/pages
MKDIR: /Users/agrieve/git/cordova/mobilespec/platforms/ios/build/emulator/mobilespec.app/www
 /autotest/tests
MKDIR: /Users/agrieve/git/cordova/mobilespec/platforms/ios/build/emulator/mobilespec.app/www
 /battery
MKDIR: /Users/agrieve/git/cordova/mobilespec/platforms/ios/build/emulator/mobilespec.app/www
 /benchmarks
MKDIR: /Users/agrieve/git/cordova/mobilespec/platforms/ios/build/emulator/mobilespec.app/www
 /camera
MKDIR: /Users/agrieve/git/cordova/mobilespec/platforms/ios/build/emulator/mobilespec.app/www
 /capture
MKDIR: /Users/agrieve/git/cordova/mobilespec/platforms/ios/build/emulator/mobilespec.app/www
 /compass
MKDIR: /Users/agrieve/git/cordova/mobilespec/platforms/ios/build/emulator/mobilespec.app/www
 /contacts
{quote}

I wonder if the `find` command is working differently for you? My find is at /usr/bin/find.
When you run `which find`, is that where yours is as well?


> copy-www-build-step.sh is missing a path separator in the destination
> ---------------------------------------------------------------------
>
>                 Key: CB-6383
>                 URL: https://issues.apache.org/jira/browse/CB-6383
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 3.4.0
>            Reporter: Joshua Perry
>
> In copy-www-build-step.sh anywhere that it generates the `subpath` variable it is removing
a required path separator.
> For example:
> {code:xml}
> SRC_DIR="www/"
> DST_DIR="$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME/www"
> #... snip ...
> for p in $(do_find -type d -print); do
>   subpath="${p#$SRC_DIR}"
>   mkdir "$DST_DIR$subpath" || exit 1
> done
> {code}
> This will find directories like {{www/js/}}, and {{www/css/}}.
> The {{subpath=$\{p#$SRC_DIR\}}} turns these paths into {{js/}} and {{css/}}.
> In the 3rd line, the {{mkdir}} command is taking the {{DST_DIR}} and concatenating it
with {{subpath}}... Well, {{DST_DIR}} does not end with a directory separator, and subpath
does not start with one. So you get a path like {{/Users/josh/dev/pdk/idsuck/platforms/ios/build/emulator/HelloWorld.app/wwwjs/}}
when what you really want is {{/Users/josh/dev/pdk/idsuck/platforms/ios/build/emulator/HelloWorld.app/www/js/}}
> This issue afflicts all 3 places where subpath is generated in the file.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message