generated from opensafely-core/repo-template
-
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.
Add files from
research-template
repository
See #29. These were in the `research-template` but we intend to store them here to simplify maintenance. These were taken from opensafely/research-template@5bd648f. Note that the `postAttach.sh` only existed as a line in the `devcontainer.json` and has now been moved to a script.
- Loading branch information
1 parent
3714d26
commit ddbd118
Showing
3 changed files
with
18 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
sudo rstudio-server start |
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,15 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
/usr/local/bin/pip3 install --user -r .devcontainer/requirements.in | ||
|
||
#set R working directory | ||
! grep -q "$1" $R_HOME/etc/Rprofile.site && sudo tee -a $R_HOME/etc/Rprofile.site <<< "setwd(\"$1\")" | ||
#set RStudio working directory | ||
! grep -q "$1" ~/.config/rstudio/rstudio-prefs.json && cat ~/.config/rstudio/rstudio-prefs.json | jq ". + {\"initial_working_directory\":\"$1\"}" > ~/.config/rstudio/rstudio-prefs.json | ||
#download and extract latest ehrql source | ||
wget https://github.com/opensafely-core/ehrql/archive/main.zip -P .devcontainer | ||
unzip -o .devcontainer/main.zip -d .devcontainer/ | ||
rm .devcontainer/main.zip |
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 @@ | ||
opensafely |