浏览代码

copy-from-target: docker: Use tar to create files with the correct owner

pull/220/head
MarcoFalke 1年前
父节点
当前提交
fa0f0f4e54
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      libexec/copy-from-target

+ 2
- 1
libexec/copy-from-target 查看文件

@@ -47,7 +47,8 @@ if [ $# = 0 ] ; then
fi

if [ -n "$USE_DOCKER" ]; then
docker cp gitian-target:"/home/$TUSER/$1" $2
# Use tar, so that files are created with the correct owner on the host
docker exec -u $TUSER gitian-target tar -C `dirname "$1"` -cf - `basename "$1"` | tar -C "$2" -xf -
elif [ -z "$USE_LXC" ]; then
src="${1%/}" # remove trailing / which triggers special rsync behaviour
rsync --checksum -a $QUIET_FLAG -e "ssh -oConnectTimeout=30 -oNoHostAuthenticationForLocalhost=yes -i ${GITIAN_BASE:-.}/var/id_rsa -p $VM_SSH_PORT" "$TUSER@localhost:${src}" "$2"

正在加载...
取消
保存