about summary refs log tree commit diff
path: root/profile/.profile.d/60_python.sh
blob: 9329cdf021b3572d3c7b6ae160ad2962bef79d2d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

_implementations="
python
python3
python2
"

for _implementation in ${_implementations}; do
	if command -v "${_implementation}" >/dev/null 2>&1; then
		if [ -f "${HOME}/.pystartup" ]; then
			export PYTHONSTARTUP="${HOME}/.pystartup"
		fi

		break
	fi
done

unset _implementation _implementations

Consider giving Nix/NixOS a try! <3