python(2) is not available on newer systems

This commit is contained in:
Martin Diehl 2021-09-01 08:07:55 +02:00
parent ed2b1031c2
commit de72afe6eb
2 changed files with 4 additions and 4 deletions

4
env/DAMASK.sh vendored
View File

@ -60,7 +60,7 @@ if [ ! -z "$PS1" ]; then
echo -n "heap size "
[[ "$(ulimit -d)" == "unlimited" ]] \
&& echo "unlimited" \
|| echo $(python -c \
|| echo $(python3 -c \
"import math; \
size=$(( 1024*$(ulimit -d) )); \
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
@ -68,7 +68,7 @@ if [ ! -z "$PS1" ]; then
echo -n "stack size "
[[ "$(ulimit -s)" == "unlimited" ]] \
&& echo "unlimited" \
|| echo $(python -c \
|| echo $(python3 -c \
"import math; \
size=$(( 1024*$(ulimit -s) )); \
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \

4
env/DAMASK.zsh vendored
View File

@ -50,7 +50,7 @@ if [ ! -z "$PS1" ]; then
echo -n "heap size "
[[ "$(ulimit -d)" == "unlimited" ]] \
&& echo "unlimited" \
|| echo $(python -c \
|| echo $(python3 -c \
"import math; \
size=$(( 1024*$(ulimit -d) )); \
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
@ -58,7 +58,7 @@ if [ ! -z "$PS1" ]; then
echo -n "stack size "
[[ "$(ulimit -s)" == "unlimited" ]] \
&& echo "unlimited" \
|| echo $(python -c \
|| echo $(python3 -c \
"import math; \
size=$(( 1024*$(ulimit -s) )); \
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \