mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-08 20:43:38 +02:00
pentoo-updater: learn to regexp
This commit is contained in:
parent
1ba7c610e2
commit
38b88f74d4
1 changed files with 2 additions and 2 deletions
|
|
@ -292,9 +292,9 @@ main_checks() {
|
|||
#deep checks for python, including fix
|
||||
RESET_PYTHON=0
|
||||
#first we set the python interpreters to match PYTHON_TARGETS (and ensure the versions we set are actually built)
|
||||
PYTHON2=$(emerge --info | grep -oE '^PYTHON_TARGETS\="(python[23]_[0-9]\s*)+"' | grep 'python2' | cut -d\" -f2 | cut -d" " -f 1 |sed 's#_#.#')
|
||||
PYTHON2=$(emerge --info | grep -oE '^PYTHON_TARGETS\=".*(python[23]_[0-9]\s*)+"' | grep 'python2' | cut -d\" -f2 | cut -d" " -f 1 |sed 's#_#.#')
|
||||
#PYTHON_SINGLE_TARGET is the *main* python3 implementation
|
||||
PYTHON3=$(emerge --info | grep -oE '^PYTHON_SINGLE_TARGET\="(python3*_[0-9]\s*)+"' | cut -d\" -f2 | sed 's#_#.#')
|
||||
PYTHON3=$(emerge --info | grep -oE '^PYTHON_SINGLE_TARGET\=".*(python3*_[0-9]\s*)+"' | cut -d\" -f2 | sed 's#_#.#')
|
||||
if [ -z "${PYTHON2}" ]; then
|
||||
printf "Detected Python 2 is disabled\n"
|
||||
printf "From PYTHON_TARGETS: $(emerge --info | grep '^PYTHON_TARGETS')\n"
|
||||
|
|
|
|||
Loading…
Reference in a new issue