Skip to content

Commit 6100ee7

Browse files
committed
Fix indenting issue
1 parent 51abdb0 commit 6100ee7

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

scripts/neovim_download.sh

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ function download_neovim() {
4545
local arch_type="$4"
4646
local download_url=""
4747
local download_path=""
48-
local file_name=""
48+
local file_name=""
4949

50-
local download_base_url="https://github.com/neovim/neovim/releases/download"
50+
local download_base_url="https://github.com/neovim/neovim/releases/download"
5151

5252
if [ "$os" == "Linux" ]; then
53-
file_name="nvim.appimage"
53+
file_name="nvim.appimage"
5454
download_path="$download_dir/nvim-$version-linux.appimage"
5555

5656
set +e # Prevent termination based on compare_version's return
@@ -59,11 +59,11 @@ function download_neovim() {
5959
set -e # Re-enable termination based on return values
6060

6161
if [[ $version == "nightly" ]] || [[ $version == "stable" ]] || [[ $result -eq 1 ]]; then
62-
file_name="nvim-linux-${arch_type}.appimage"
62+
file_name="nvim-linux-${arch_type}.appimage"
6363
download_path="$download_dir/nvim-$version-linux-$arch_type.appimage"
6464
fi
6565
elif [ "$os" == "Darwin" ]; then
66-
file_name="nvim-macos.tar.gz"
66+
file_name="nvim-macos.tar.gz"
6767
download_path="$download_dir/nvim-$version-macos.tar.gz"
6868

6969
set +e # Prevent termination based on compare_version's return
@@ -72,15 +72,15 @@ function download_neovim() {
7272
set -e # Re-enable termination based on return values
7373

7474
if [[ $version == "nightly" ]] || [[ $version == "stable" ]] || [[ $result -eq 1 ]]; then
75-
file_name="nvim-macos-${arch_type}.tar.gz"
75+
file_name="nvim-macos-${arch_type}.tar.gz"
7676
download_path="$download_dir/nvim-$version-macos-$arch_type.tar.gz"
7777
fi
7878
else
7979
echo "Error: Currently download support is present only for Linux and macOS"
8080
exit 1
8181
fi
8282

83-
local download_url="$download_base_url/${version}/$file_name"
83+
local download_url="$download_base_url/${version}/$file_name"
8484

8585
local checksum_path="$download_path".sha256sum
8686
local expected_checksum=""
@@ -100,23 +100,23 @@ function download_neovim() {
100100
echo "Downloading Neovim..."
101101
download "$download_url" "$download_path"
102102

103-
set +e # Prevent termination based on compare_version's return
104-
compare_versions "$version" v0.10.4
105-
local result=$?
106-
set -e # Re-enable termination based on return values
103+
set +e # Prevent termination based on compare_version's return
104+
compare_versions "$version" v0.10.4
105+
local result=$?
106+
set -e # Re-enable termination based on return values
107107

108108
if [[ $version != "nightly" ]]; then
109109
# Nightly versions do not come with checksums
110-
if [ $result -eq 1 ]; then
111-
# Since v0.11.0, checksums are gathered in shasum.txt,
112-
# so we need to extract the checksum from it
113-
local temp_path="$download_path".sha256sum.tmp
114-
download "$download_base_url/${version}/shasum.txt" "$temp_path"
115-
cat $temp_path | grep "$file_name\$" >> "$checksum_path"
116-
rm $temp_path
117-
else
118-
download "$download_url".sha256sum "$checksum_path"
119-
fi
110+
if [ $result -eq 1 ]; then
111+
# Since v0.11.0, checksums are gathered in shasum.txt,
112+
# so we need to extract the checksum from it
113+
local temp_path="$download_path".sha256sum.tmp
114+
download "$download_base_url/${version}/shasum.txt" "$temp_path"
115+
cat $temp_path | grep "$file_name\$" >> "$checksum_path"
116+
rm $temp_path
117+
else
118+
download "$download_url".sha256sum "$checksum_path"
119+
fi
120120
fi
121121
echo "Download completed."
122122
}

0 commit comments

Comments
 (0)