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

Joshua Perry commented on CB-6383:
----------------------------------

I am using GNU find from mac ports:

$ which find
/opt/local/libexec/gnubin/find

$ find --version
find (GNU findutils) 4.4.2
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Eric B. Decker, James Youngman, and Kevin Dalley.
Built using GNU gnulib version e5573b1bad88bfabcda181b9e0125fb0c52b7d3b
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS() 
CBO(level=0)

> 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)

Reply via email to