From c6f243c2c1ff7734e76c4342ab5c116c6fd2e928 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 8 Dec 2022 21:34:40 +0100 Subject: [PATCH] sh: Fix missing python configuration Python complains if you point it to a different configuration file (as we do with the changes to XDG directories) but it doesn't exist. So, we simply check for its existence and create it if necessary when setting up an environment. --- sh/.config/sh/xdg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sh/.config/sh/xdg b/sh/.config/sh/xdg index 8738649..4d645e1 100644 --- a/sh/.config/sh/xdg +++ b/sh/.config/sh/xdg @@ -84,6 +84,10 @@ export LESSHISTFILE="XDG_STATE_HOME/lesshst" export MPLAYER_HOME="$XDG_CONFIG_HOME/mplayer" export NODE_REPL_HISTORY="$XDG_STATE_HOME/node_repl_history" export NVM_DIR="$XDG_DATA_HOME/nvm" +if [ ! -e "$PYTHONSTARTUP" ]; then + mkdir -p "$XDG_CONFIG_HOME/python" + touch "$PYTHONSTARTUP" +fi export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/pythonrc" export SQLITE_HISTORY="$XDG_STATE_HOME/sqlite_history" export TEXMFVAR="$XDG_CACHE_HOME/texlive/texmf-var"