Skip to content

Commit dde9f1b

Browse files
authored
chore: tweak the configure script (#316)
1 parent 24d4599 commit dde9f1b

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

R/000-wrappers.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ NULL
1111

1212
# Check class and extract the external pointer embedded in the environment
1313
.savvy_extract_ptr <- function(e, class) {
14-
if (is.null(e)) {
14+
if(is.null(e)) {
1515
return(NULL)
1616
}
1717

18-
if (inherits(e, class)) {
18+
if(inherits(e, class)) {
1919
e$.ptr
2020
} else {
2121
msg <- paste0("Expected ", class, ", got ", class(e)[1])
@@ -65,3 +65,5 @@ NULL
6565
`prql_get_targets` <- function() {
6666
.Call(savvy_prql_get_targets__impl)
6767
}
68+
69+

configure

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,23 @@ EOF
5656
if [ "${LIBPRQLR_BUILD}" = "false" ]; then
5757
if [ -f "tools/lib-sums.tsv" ] && [ ! -f "${LIBPRQLR_PATH}" ]; then
5858
cat <<EOF
59-
--------------- [TRY TO DOWNLOAD PRE-BUILT BINARY] ---------------
59+
---------------- [TRY TO DOWNLOAD PRE-BUILT BINARY] ----------------
6060
The library was not found at <${LIBPRQLR_PATH}>.
61-
Trying to download pre-built binary from the Internet.
62-
$("${R_HOME}/bin${R_ARCH_BIN}/Rscript" "tools/prep-lib.R" && echo "Done!" || echo "Failed to download pre-built binary.")
63-
------------------------------------------------------------------
61+
Trying to download pre-built binary from the Internet...
62+
--------------------------------------------------------------------
6463
EOF
64+
"${R_HOME}/bin${R_ARCH_BIN}/Rscript" "tools/prep-lib.R" && echo "Done!" ||
65+
echo "Failed to download pre-built binary."
6566
fi
6667

6768
if [ -f "${LIBPRQLR_PATH}" ] && [ "${LIBPRQLR_PATH}" != "${LIBPRQLR_DEFAULT_PATH}" ]; then
6869
cat <<EOF
69-
------------------------ [COPYING BINARY] ------------------------
70+
------------------------- [COPYING BINARY] -------------------------
7071
Copying <${LIBPRQLR_PATH}> to <${LIBPRQLR_DEFAULT_PATH}>.
71-
$(mkdir -p "$(dirname "${LIBPRQLR_DEFAULT_PATH}")")
72-
$(cp "${LIBPRQLR_PATH}" "${LIBPRQLR_DEFAULT_PATH}" && echo "Done!" || echo "Failed to copy binary.")
73-
------------------------------------------------------------------
72+
--------------------------------------------------------------------
7473
EOF
74+
$(mkdir -p "$(dirname "${LIBPRQLR_DEFAULT_PATH}")")
75+
$(cp "${LIBPRQLR_PATH}" "${LIBPRQLR_DEFAULT_PATH}" && echo "Done!" || echo "Failed to copy binary.")
7576
fi
7677

7778
if [ -f "${LIBPRQLR_DEFAULT_PATH}" ]; then
@@ -100,9 +101,9 @@ detect_target_option() {
100101
--host=*)
101102
specified_target="$(echo "${option}" | sed -e 's/--host=//' | sed -E 's/([0-9]+\.)*[0-9]+$//')"
102103
cat <<EOF
103-
------------------------- [DETECTED TARGET] -------------------------
104+
------------------------ [DETECTED TARGET] ------------------------
104105
The target was specified as <${specified_target}> via the '--host' option.
105-
---------------------------------------------------------------------
106+
-------------------------------------------------------------------
106107
EOF
107108
export TARGET="${specified_target}"
108109
;;

0 commit comments

Comments
 (0)