nealrichardson commented on code in PR #12849:
URL: https://github.com/apache/arrow/pull/12849#discussion_r852132974


##########
r/Makefile:
##########
@@ -41,7 +41,8 @@ deps:
 # we must rename .env to dotenv and then replace references to it in 
cpp/CMakeLists.txt
 sync-cpp:
        cp ../NOTICE.txt inst/NOTICE.txt
-       rsync --archive --delete --exclude 'apidoc' --exclude 'build' --exclude 
'build-support/boost_*' --exclude 'examples' --exclude 'src/gandiva' --exclude 
'src/jni' --exclude 'src/plasma' --exclude 'src/skyhook' --exclude 'submodules' 
--exclude '**/*_test.cc' ../cpp tools/
+       rsync --archive --delete --exclude 'apidoc' --exclude 'build' --exclude 
'build-support/boost_*' --exclude 'examples' --exclude 'src/gandiva' --exclude 
'src/jni' --exclude 'src/plasma' --exclude 'src/skyhook' --exclude 'submodules' 
--exclude '**/*_test.cc' --exclude 'thirdparty' ../cpp tools/
+       cp -p ../cpp/thirdparty/versions.txt tools/

Review Comment:
   We need versions.txt to be inside of cpp/thirdparty because cmake expects it 
there, and we also need a header that is included there, so let's just keep the 
whole dir as before
   
   ```suggestion
        rsync --archive --delete --exclude 'apidoc' --exclude 'build' --exclude 
'build-support/boost_*' --exclude 'examples' --exclude 'src/gandiva' --exclude 
'src/jni' --exclude 'src/plasma' --exclude 'src/skyhook' --exclude 'submodules' 
--exclude '**/*_test.cc'  ../cpp tools/
   ```



##########
r/tools/download_dependencies_R.sh:
##########
@@ -0,0 +1,64 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# This script downloads all the thirdparty dependencies as a series of tarballs
+# that can be used for offline builds, etc.
+# This script is specific for R users, using R's download facilities rather 
than
+# wget. The original version of this script is 
cpp/thirdparty/download_dependencies.sh
+# Changes from the original:
+#  * don't download the files, just emit R code to download
+#  * require a download directory
+#  * don't print env vars
+
+set -eu
+
+SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+if [ "$#" -ne 1 ]; then
+  >&2 echo "Download directory must be specified on the command line"
+  exit 1
+else
+  DESTDIR=$1
+fi
+
+download_dependency() {
+  local url=$1
+  local out=$2
+
+  echo 'download.file("'${url}'", "'${out}'", quiet = TRUE)'
+}
+
+main() {
+  mkdir -p "${DESTDIR}"
+
+  # Load `DEPENDENCIES` variable.
+  source ${SOURCE_DIR}/versions.txt

Review Comment:
   ```suggestion
     source ${SOURCE_DIR}/cpp/thirdparty/versions.txt
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to