Remove dir_mount_map variable

This commit is contained in:
Amin Vakil 2022-01-11 09:30:52 +03:30
parent 2c155e9e4e
commit ca85d56f4b
No known key found for this signature in database
GPG Key ID: 1EFC1864E9D9E56B
1 changed files with 1 additions and 2 deletions

View File

@ -275,7 +275,7 @@ pre_check () {
fi
local -a errs dirs=("${!dir_space_map[@]}")
local dir mount avail i=0
local -A mount_avail_map dir_mount_map mount_space_map
local -A mount_avail_map mount_space_map
while read -r mount avail; do
if [[ $mount == 'Filesystem' ]]; then
continue
@ -283,7 +283,6 @@ pre_check () {
dir=${dirs[$((i++))]}
dir_mount_map[$dir]=$mount
mount_avail_map[$mount]=${avail%M}
(( mount_space_map[$mount]+=dir_space_map[$dir] ))
done < <(df -BM --output=source,avail "${dirs[@]}")