Skip to content

Commit 18d4280

Browse files
committed
Teste un script d'install
1 parent 6e1c20f commit 18d4280

4 files changed

Lines changed: 14 additions & 34 deletions

File tree

.github/workflows/prod.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
run: |
2424
sudo ./docker/dependencies.sh
2525
rv sync
26+
rm _quarto.yml
27+
cp _quarto-prod.yml _quarto.yml
2628
- name: Set up Quarto environment
2729
uses: quarto-dev/quarto-actions/setup@v2
2830

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ temp_dataset/
22
_dataset/
33
*.parquet
44
mon_dataset_parquet/
5+
site_libs
56

67
.Rhistory
78
.RData

_quarto.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ project:
66
- 03_Fiches_thematiques/Fiche_rprojects.qmd
77
- 03_Fiches_thematiques/Fiche_import_fichiers_plats.qmd
88
- 03_Fiches_thematiques/Fiche_tidyverse.qmd
9+
- "!rv/"
910

1011
comments:
1112
hypothesis: true

init_utilitr.sh

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,13 @@
11
#!/bin/bash
2-
echo "$PROTOCOL://$USERNAME:$TOKEN@$HOST" > /home/onyxia/git.store
3-
chown onyxia /home/onyxia/git.store
4-
chmod o-r,g-r /home/onyxia/git.store
5-
runuser -l onyxia -c 'git config --global credential.helper "store --file ~/git.store"'
6-
if [ -z "$FORK" ]
7-
then
8-
echo "Pas de clonage de dépôt"
9-
elif [ "$FORK" = "TRUE" ]
10-
then
11-
runuser -l onyxia -c "cd $WORKSPACE_DIR && \
12-
git clone https://github.com/$USERNAME/utilitr.git && \
13-
cd utilitr && \
14-
git remote add upstream https://github.com/inseefrlab/utilitr.git && \
15-
git fetch upstream
16-
rv sync"
2+
curl -sSL https://raw.githubusercontent.com/A2-ai/rv/refs/heads/main/scripts/install.sh | bash
3+
4+
if [ -d "/home/onyxia/work/utilitr" ]; then
5+
cd /home/onyxia/work/utilitr
6+
rv sync
177
else
18-
cd /home/onyxia/work
19-
runuser -l onyxia -c "cd $WORKSPACE_DIR && \
20-
git clone https://github.com/inseefrlab/utilitr.git && \
21-
cd utilitr
22-
rv sync"
23-
fi
24-
if [ ! -z "$FORK" ]
25-
then
26-
# Open the project
27-
echo \
28-
"
29-
setHook('rstudio.sessionInit', function(newSession) {
30-
if (newSession && identical(getwd(), path.expand(\"$WORKSPACE_DIR\")))
31-
{
32-
message('Ouverture du tutoriel')
33-
rstudioapi::openProject(\"$WORKSPACE_DIR/utilitr\")
34-
}
35-
}, action = 'append')
36-
" >> /home/onyxia/.Rprofile
8+
git clone https://github.com/inseefrlab/utilitr
9+
cd /home/onyxia/work/utilitr
10+
rv sync
11+
cd ..
12+
rm -rf utilitr
3713
fi

0 commit comments

Comments
 (0)