1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2025-01-25 03:32:02 +02:00

install.sh: Fix various ShellCheck issues

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2023-06-01 11:35:41 +02:00
parent a519cfe3a1
commit 335a38d78f

View File

@ -177,7 +177,7 @@ done < <(eval "$find_command")
# Get list of file names without extensions
files_dedup=( "${files[@]}" )
for i in "${!files_dedup[@]}"; do
files_dedup[$i]="${files_dedup[$i]%.*}"
files_dedup[i]="${files_dedup[$i]%.*}"
done
# Remove duplicates
@ -188,7 +188,7 @@ for i in "${!files_dedup[@]}"; do
ext="${files[$i]##*.}"
# Only remove if the extension is the one we don’t want
if [ "$ext" != "$extension" ]; then
unset files["$i"]
unset "${files[$i]}"
fi
fi
done
@ -226,7 +226,7 @@ case $mode in
list)
for file in "${files[@]}"; do
file=$(basename "$file")
echo "$font_dir/${file#$nerdfonts_root_dir/}"
echo "$font_dir/${file#"$nerdfonts_root_dir"/}"
done
exit 0
;;