#!/bin/sh # # curl -sL nvim.luminiferous.eu | sh # # Init Portable Folder export NVIM="$HOME/.nvim-portable" rm -rf $NVIM mkdir $NVIM cd $NVIM # Get nvim AppImage curl -LO https://github.com/neovim/neovim-releases/releases/latest/download/nvim-linux-x86_64.appimage mv nvim-linux-x86_64.appimage nvim.appimage chmod +x nvim.appimage # Get config files curl -LO https://git.luminiferous.eu/Luminiferous/dotfiles/raw/branch/nvim/init.lua curl -LO https://git.luminiferous.eu/Luminiferous/dotfiles/raw/branch/ripgrep/rg.conf # Get ripgrep curl -L https://github.com/jqlang/jq/releases/latest/download/jq-linux-amd64 -o jq chmod +x jq curl -LO $(curl -s https://api.github.com/repos/BurntSushi/ripgrep/releases/latest | ./jq -r '.assets[] | select(.name | endswith("x86_64-unknown-linux-musl.tar.gz")) | .browser_download_url') rm -rf jq mv ripgrep* archive.tar.gz tar -xvf archive.tar.gz rm -rf archive.tar.gz mv ripgrep*/rg rg chmod +x rg rm -rf ripgrep* # Write Launch Files cat > $NVIM/init << EndOfMessage #!/bin/sh export PATH="$NVIM:\$PATH" EndOfMessage chmod +x $NVIM/init cat > $NVIM/nvim << EndOfMessage #!/bin/sh RIPGREP_CONFIG_PATH=\$(dirname "\$0")/rg.conf XDG_CONFIG_HOME=\$(dirname "\$0")/config XDG_DATA_HOME=\$(dirname "\$0")/share XDG_STATE_HOME=\$(dirname "\$0")/state XDG_CACHE_HOME=\$(dirname "\$0")/cache NVIM_LOG_FILE=/dev/null \$(dirname "\$0")/nvim.appimage -n -i NONE -u \$(dirname "\$0")/init.lua "\$@" EndOfMessage chmod +x $NVIM/nvim