mirror of
https://github.com/nihas101/steamos-scripts.git
synced 2026-10-06 06:00:29 +02:00
README: Add explanations on scripts
This commit is contained in:
1 parent
0c76854d28
commit
c9690dc110
6 files changed
+74
-8
No files matched your search
+23
-2
@@ -1,9 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
install_neovim() {
|
||||
function yes_or_no {
|
||||
while true; do
|
||||
read -p "$* [y/n]: " yn
|
||||
case $yn in
|
||||
[Yy]*) return 0 ;;
|
||||
[Nn]*) return 1 ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
function install_neovim {
|
||||
nvim="${HOME}/bin/nvim"
|
||||
|
||||
if [ -e ${nvim} ]; then
|
||||
nvim -v
|
||||
yes_or_no "nvim is already installed, do you want to overwrite the existing installation?"
|
||||
fi
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Aborting install of neovim."
|
||||
return 0
|
||||
fi
|
||||
|
||||
version=${1:-nightly}
|
||||
echo "Installing nvim ${version}..."
|
||||
nvim="${HOME}/bin/nvim"
|
||||
nvimurl="https://github.com/neovim/neovim/releases/download/${version}/nvim-linux-x86_64.appimage"
|
||||
mkdir -p "$(dirname "$nvim")"
|
||||
curl -fL "$nvimurl" -o "$nvim" -z "$nvim"
|
||||
|
||||
Reference in new issue
Block a user