1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-18 21:41:57 +00:00

test-in-docker: make vars sorted and readonly

Marking variables as readonly is helpful for debugging and preventing
problems.
This commit is contained in:
Christian Höltje 2018-06-27 11:21:23 -04:00
parent 645034f74c
commit 89863209fc

View file

@ -16,16 +16,18 @@ term=screen-256color
# ...see Modifiers in zshexpn(1) for details. # ...see Modifiers in zshexpn(1) for details.
# List of ZSH versions # List of ZSH versions
typeset -a versions typeset -aU versions
versions=( docker/base-*/Dockerfile(N.on:h:t:s/base-//) ) versions=( docker/base-*/Dockerfile(N.on:h:t:s/base-//) )
typeset -r versions
# List of frameworks # List of frameworks
typeset -a frameworks typeset -aU frameworks
frameworks=( docker/*/Dockerfile(N.on:h:t) ) frameworks=( docker/*/Dockerfile(N.on:h:t) )
for i in {$#frameworks..1}; do for i in {$#frameworks..1}; do
# Remove all base entries # Remove all base entries
[[ "${frameworks[$i]}" = base-* ]] && frameworks[$i]=() [[ "${frameworks[$i]}" = base-* ]] && frameworks[$i]=()
done done
typeset -r frameworks
# Known Issues # Known Issues
typeset -A known_issues typeset -A known_issues
@ -34,6 +36,7 @@ known_issues["4.3.11-zim"]="BROKEN: Zim wants ZSH 5.2 or newer."
known_issues["5.0.3-zim"]="DEPRECATED: Zim wants ZSH 5.2 or newer." known_issues["5.0.3-zim"]="DEPRECATED: Zim wants ZSH 5.2 or newer."
known_issues["5.1.1-zim"]="DEPRECATED: Zim wants ZSH 5.2 or newer." known_issues["5.1.1-zim"]="DEPRECATED: Zim wants ZSH 5.2 or newer."
known_issues["4.3.11-zulu"]="Zulu doesn't work; it needs a newer version of git." known_issues["4.3.11-zulu"]="Zulu doesn't work; it needs a newer version of git."
typeset -r known_issues
err() err()
{ {
@ -178,6 +181,8 @@ while (( $# > 0 )); do
shift shift
done done
typeset -r use_version use_framework
build_and_run "$use_version" "$use_framework" build_and_run "$use_version" "$use_framework"
# EOF # EOF