mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-26 07:14:17 -05:00
Merge pull request #987 from likzn/fix/install_arr
fix(install.sh):fix `rust version` check
This commit is contained in:
commit
aaccd6f7f3
1 changed files with 15 additions and 0 deletions
15
install.sh
15
install.sh
|
@ -75,6 +75,21 @@ function vercomp() {
|
||||||
then
|
then
|
||||||
max_len=$len2
|
max_len=$len2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#pad right in short arr
|
||||||
|
if [[ len1 -gt len2 ]];
|
||||||
|
then
|
||||||
|
for ((i = len2; i < len1; i++));
|
||||||
|
do
|
||||||
|
v2[$i]=0
|
||||||
|
done
|
||||||
|
else
|
||||||
|
for ((i = len1; i < len2; i++));
|
||||||
|
do
|
||||||
|
v1[$i]=0
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
for i in `seq 0 $max_len`
|
for i in `seq 0 $max_len`
|
||||||
do
|
do
|
||||||
# Fill empty fields with zeros in v1
|
# Fill empty fields with zeros in v1
|
||||||
|
|
Loading…
Reference in a new issue