You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Alex Cash (JIRA)" <ji...@apache.org> on 2013/04/06 18:33:15 UTC
[jira] [Commented] (CB-2725) Improve `Copy www directory` script to
copy files when `www` is a symlink directory
[ https://issues.apache.org/jira/browse/CB-2725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13624459#comment-13624459 ]
Alex Cash commented on CB-2725:
-------------------------------
First off, thanks for the work on this. It's much appreciated!
The patch @ 7d6d9859742b26d754b0daecb522d7850f3e78fc failed for me when I had a symlink to a directory inside my www directory. The script created a new directory of the same name, but failed to copy the contents of the symlinked directory into the new directory.
Being a web dev, my bash script foo isn't up to par, but I had a hammer and this looked like a nail so I was able to get my build to work by adding
{code}
rsync -a "$SRC_DIR$subpath/" "$DST_DIR$subpath/" || exit 3
{/code}
after
{code}
if [ "$sourcetype" = "Directory" ]; then
mkdir "$DST_DIR$subpath" || exit 2
{/code}
Note that I did increment the exit codes. I can provide a reduction if reproducing proves difficult.
> Improve `Copy www directory` script to copy files when `www` is a symlink directory
> -----------------------------------------------------------------------------------
>
> Key: CB-2725
> URL: https://issues.apache.org/jira/browse/CB-2725
> Project: Apache Cordova
> Issue Type: Improvement
> Components: iOS
> Affects Versions: 2.5.0, 2.6.0
> Environment: XCode when building.
> Reporter: Cristobal Dabed
> Assignee: James Jong
> Priority: Minor
> Labels: improvement, patch, xCode
> Fix For: 2.7.0
>
> Original Estimate: 5m
> Remaining Estimate: 5m
>
> Under the copy directory section ammend the following lines
> <code>
> if [[ -L $SRC_DIR ]]; then
> SRC_DIR="www/" ## is symlink set path to "www/"
> fi
> </code>
> or just set it to
> <code>
> SRC_DIR="www/"
> </code>
> Both variants work.
> Otherwise it will not copy the files when the `www` folder is a symlink folder.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira