-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
285 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Package: ravemanager | ||
Title: Manage 'RAVE' Packages | ||
Version: 1.0.35 | ||
Version: 1.0.36 | ||
Authors@R: | ||
person("Zhengjia", "Wang", email = "[email protected]", | ||
role = c("aut", "cre")) | ||
|
@@ -14,6 +14,8 @@ Roxygen: list(markdown = TRUE) | |
RoxygenNote: 7.2.3 | ||
URL: https://dipterix.org/ravemanager/, | ||
http://dipterix.org/ravemanager/ | ||
Imports: | ||
utils | ||
Suggests: | ||
learnr, | ||
pkgload, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -u | ||
|
||
SCRIPT_DIR=$(dirname "$0") | ||
R_CMD=$(which Rscript || echo $1) | ||
OS_TYPE=$(/usr/bin/uname) | ||
|
||
if [ "$2" == "--skip-sysreq" ]; then | ||
echo "Skipping system requisites" | ||
elif [ "$OS_TYPE" == "Darwin" ]; then | ||
echo "Operating System: macOS" | ||
. "${SCRIPT_DIR}/shell/installer-prerequisites-osx.sh" | ||
elif [ "$OS_TYPE" == "Linux" ]; then | ||
echo "Operating System: Linux" | ||
# . "${SCRIPT_DIR}/shell/installer-prerequisites-linux.sh" | ||
fi | ||
|
||
|
||
# Load installer commons | ||
. "${SCRIPT_DIR}/shell/installer-common.sh" | ||
|
||
|
||
ohai "Operating System: ${OS_TYPE}" | ||
ohai "R binary path: ${R_CMD}" | ||
|
||
|
||
# Create a temporary directory | ||
tmpdir=$(mktemp -d -t "rave-installer") | ||
cd "${tmpdir}" | ||
|
||
ohai "Current directory: ${tmpdir}" | ||
|
||
# Install ravemanager | ||
lib_path=$(${R_CMD} --no-save --no-restore -e 'cat(Sys.getenv("RAVE_LIB_PATH", unset = Sys.getenv("R_LIBS_USER", unset = .libPaths()[[1]])))') | ||
|
||
ohai "R Library path: $lib_path" | ||
|
||
mkdir -p "$lib_path" | ||
|
||
|
||
cmd_str=" | ||
lib_path <- '$lib_path' | ||
if( system.file(package = 'ravemanager', lib.loc = lib_path) == '' ) { | ||
install.packages('ravemanager', repos = 'https://rave-ieeg.r-universe.dev', lib = lib_path) | ||
} | ||
loadNamespace('ravemanager', lib.loc = lib_path) | ||
ravemanager::install(allow_cache = FALSE) | ||
" | ||
ohai "Running R command: ${cmd_str}" | ||
${R_CMD} --no-save --no-restore -e "${cmd_str}" | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
set -u | ||
|
||
SCRIPT_DIR=$(dirname "$0") | ||
|
||
# Load installer commons | ||
. "${SCRIPT_DIR}/installer-common.sh" | ||
|
||
ohai "Checking sudo access (may require your password): " | ||
have_sudo_access true | ||
|
||
UNAME_MACHINE="$(/usr/bin/uname -m)" | ||
if [[ "$UNAME_MACHINE" == "arm64" ]]; then | ||
# On ARM macOS, this script installs to /opt/homebrew only | ||
HOMEBREW_PREFIX="/opt/homebrew" | ||
HOMEBREW_REPOSITORY="${HOMEBREW_PREFIX}" | ||
else | ||
# On Intel macOS, this script installs to /usr/local only | ||
HOMEBREW_PREFIX="/usr/local" | ||
HOMEBREW_REPOSITORY="${HOMEBREW_PREFIX}/Homebrew" | ||
fi | ||
|
||
# Install brew | ||
execute_sudo echo | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
|
||
|
||
# Add brew to zsh (z-shell), bash, and sh | ||
# execute echo "eval \"\$($HOMEBREW_PREFIX/bin/brew shellenv)\"" >> "$HOME/.zprofile" | ||
# execute echo "eval \"\$($HOMEBREW_PREFIX/bin/brew shellenv)\"" >> "$HOME/.bash_profile" | ||
# execute echo "eval \"\$($HOMEBREW_PREFIX/bin/brew shellenv)\"" >> "$HOME/.profile" | ||
# Activate brew | ||
eval "$($HOMEBREW_PREFIX/bin/brew shellenv)" | ||
|
||
execute $HOMEBREW_PREFIX/bin/brew install hdf5 fftw libgit2 libxml2 pkg-config libjpeg libpng libtiff cmake |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.