Skip to content

Commit 9135584

Browse files
committed
binder built
1 parent 3a44f7b commit 9135584

File tree

3 files changed

+65
-4
lines changed

3 files changed

+65
-4
lines changed

apt.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
zip

install.R

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
install.packages("tidyverse")
2-
install.packages("rvest")
3-
install.packages("knitr")
4-
install.packages("rmarkdown")
1+
install.packages('renv')
2+
renv::restore()

postBuild

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/bin/bash -v
2+
3+
# determine which version of Quarto to install
4+
QUARTO_VERSION=1.4.532
5+
6+
# See whether we need to lookup a Quarto version
7+
if [ $QUARTO_VERSION = "prerelease" ]; then
8+
QUARTO_JSON="_prerelease.json"
9+
elif [ $QUARTO_VERSION = "release" ]; then
10+
QUARTO_JSON="_download.json"
11+
fi
12+
13+
if [ $QUARTO_JSON != "" ]; then
14+
15+
# create a python script and run it
16+
PYTHON_SCRIPT=_quarto_version.py
17+
if [ -e $PYTHON_SCRIPT ]; then
18+
rm -rf $PYTHON_SCRIPT
19+
fi
20+
21+
cat > $PYTHON_SCRIPT <<EOF
22+
import urllib, json
23+
24+
import urllib.request, json
25+
with urllib.request.urlopen("https://quarto.org/docs/download/${QUARTO_JSON}") as url:
26+
data = json.load(url)
27+
print(data['version'])
28+
29+
EOF
30+
31+
QUARTO_VERSION=$(python $PYTHON_SCRIPT)
32+
rm -rf $PYTHON_SCRIPT
33+
34+
fi
35+
36+
37+
echo
38+
echo Installing Quarto $QUARTO_VERSION
39+
echo
40+
41+
# download and install the deb file
42+
curl -LO https://github.com/quarto-dev/quarto-cli/releases/download/v$QUARTO_VERSION/quarto-$QUARTO_VERSION-linux-amd64.deb
43+
dpkg -x quarto-$QUARTO_VERSION-linux-amd64.deb .quarto
44+
rm -rf quarto-$QUARTO_VERSION-linux-amd64.deb
45+
46+
# get quarto in the path
47+
mkdir -p ~/.local/bin
48+
ln -s ~/.quarto/opt/quarto/bin/quarto ~/.local/bin/quarto
49+
50+
# create the proper pandoc symlink to enable visual editor in Quarto extension
51+
ln -s ~/.quarto/opt/quarto/bin/tools/x86_64/pandoc ~/.quarto/opt/quarto/bin/tools/pandoc
52+
53+
54+
echo
55+
echo Installed Quarto
56+
echo
57+
# install required python packages
58+
python3 -m pip install jupyterlab-quarto==0.1.45
59+
60+
echo
61+
echo Completed
62+
echo

0 commit comments

Comments
 (0)