Skip to content

Commit e76894f

Browse files
authored
Better bash syntax
1 parent d0bbcc5 commit e76894f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/using/recipes.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -557,12 +557,12 @@ The example below is a Dockerfile to load Source Han Sans with normal weight whi
557557
```dockerfile
558558
FROM jupyter/scipy-notebook:latest
559559

560-
RUN PYV=$(ls $CONDA_DIR/lib | grep ^python) && \
561-
MPL_DATA=$CONDA_DIR/lib/$PYV/site-packages/matplotlib/mpl-data && \
562-
wget --quiet -P $MPL_DATA/fonts/ttf/ https://mirrors.cloud.tencent.com/adobe-fonts/source-han-sans/SubsetOTF/CN/SourceHanSansCN-Normal.otf && \
563-
sed -i 's/#font.family/font.family/g' $MPL_DATA/matplotlibrc && \
564-
sed -i 's/#font.sans-serif:/font.sans-serif: Source Han Sans CN,/g' $MPL_DATA/matplotlibrc && \
565-
sed -i 's/#axes.unicode_minus: True/axes.unicode_minus: False/g' $MPL_DATA/matplotlibrc && \
566-
rm -rf ~/.cache/matplotlib && \
560+
RUN PYV=$(ls "${CONDA_DIR}/lib" | grep ^python) && \
561+
MPL_DATA="${CONDA_DIR}/lib/${PYV}/site-packages/matplotlib/mpl-data" && \
562+
wget --quiet -P "${MPL_DATA}/fonts/ttf/" https://mirrors.cloud.tencent.com/adobe-fonts/source-han-sans/SubsetOTF/CN/SourceHanSansCN-Normal.otf && \
563+
sed -i 's/#font.family/font.family/g' "${MPL_DATA}/matplotlibrc" && \
564+
sed -i 's/#font.sans-serif:/font.sans-serif: Source Han Sans CN,/g' "${MPL_DATA}/matplotlibrc" && \
565+
sed -i 's/#axes.unicode_minus: True/axes.unicode_minus: False/g' "${MPL_DATA}/matplotlibrc" && \
566+
rm -rf "/home/${NB_USER}/.cache/matplotlib" && \
567567
python -c 'import matplotlib.font_manager;print("font loaded: ",("Source Han Sans CN" in [f.name for f in matplotlib.font_manager.fontManager.ttflist]))'
568568
```

0 commit comments

Comments
 (0)