diff --git a/install/lite-xl b/install/lite-xl index 9a170b5..f68a04b 100755 --- a/install/lite-xl +++ b/install/lite-xl @@ -1,43 +1,45 @@ #!/usr/bin/env bash -##makedesc: Install lite-xl +##makedesc: Install lite-xl v2.1.7 # https://github.com/lite-xl/lite-xl/releases -# https://lite-xl.com/en/documentation/build +# https://lite-xl.com/setup/getting-started/ echo echo "===============================================" -echo "Installing lite-xl v2.1.0..." +echo "Installing lite-xl v2.1.7..." echo "===============================================" echo -tar_url="https://github.com/lite-xl/lite-xl/releases/download/v2.1.0/lite-xl-v2.1.0-addons-linux-x86_64-portable.tar.gz" -tar_filepath="/tmp/lite-xl.tar.gz" +tar_url="https://github.com/lite-xl/lite-xl/releases/download/v2.1.7/lite-xl-v2.1.7-addons-linux-x86_64-portable.tar.gz" +lpm_url="https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/latest/lpm.x86_64-linux" +tar_filepath="$HOME/install/lite-xl-v2.1.7.tar.gz" untar_dir="$HOME/install" -untar_subdir="$untar_dir/lite-xl" -dest_bin_dir="$HOME/.local/bin" -dest_config_dir="$HOME/.config/lite-xl" -dest_share_dir="$HOME/.local/share" -dest_share_subdir="$dest_share_dir/lite-xl" -wget "$tar_url" -O "$tar_filepath" +rm -rf \ + "$HOME/.local/bin/lpm" \ + "$HOME/install/lite-xl" \ + "$HOME/.local/bin/lite-xl" \ + "$HOME/.local/share/lite-xl" + mkdir -vp \ "$untar_dir" \ - #"$dest_config" \ - "$dest_bin_dir" \ - "$dest_share_dir" + "$HOME/.local/bin" \ + "$HOME/.local/share/lite-xl" -tar -xzf "$tar_filepath" -C "$untar_dir" -mv -fv "$untar_subdir/lite-xl" "$dest_bin_dir/lite-xl" -mv -fvT "$untar_subdir/data" "$dest_share_subdir" -rm -fr "$tar_file" "$untar_subdir" +wget "$tar_url" -O "$tar_filepath" && \ + wget "$lpm_url" -O "$HOME/.local/bin/lpm" && \ + chmod +x "$HOME/.local/bin/lpm" && \ + tar -xzf "$tar_filepath" -C "$untar_dir" && \ + cp -vf "$untar_dir/lite-xl/lite-xl" "$HOME/.local/bin/" && \ + cp -vfr "$untar_dir"/lite-xl/data/* "$HOME/.local/share/lite-xl/" # echo -e "\nexport LITE_SCALE=1 # https://github.com/lite-xl/lite-xl/issues/1173\n" >> $HOME/.profile -cat << EOF > "$dest_share_dir/applications/org.lite_xl.lite_xl.desktop" +cat << EOF > "$HOME/.local/share/applications/org.lite_xl.lite_xl.desktop" [Desktop Entry] Type=Application Name=Lite XL Comment=A lightweight text editor written in Lua -Exec=env LITE_SCALE=1 ${dest_bin_dir}/lite-xl %F +Exec=$HOME/.local/bin/lite-xl %F Icon=lite-xl Terminal=false StartupWMClass=lite-xl @@ -48,53 +50,6 @@ EOF sudo update-desktop-database && \ xdg-desktop-menu forceupdate -echo -echo "===============================================" -echo "Installing lite-xl plugins..." -echo "https://github.com/lite-xl/lite-xl-plugins" -echo "===============================================" -echo - -download_plugin() { - echo "- $1" - curl -s "https://raw.githubusercontent.com/lite-xl/lite-xl-plugins/master/plugins/$1.lua" \ - > "$dest_share_subdir/plugins/$1.lua" -} - -download_plugin "align_carets" -download_plugin "autosaveonfocuslost" -download_plugin "bracketmatch" -download_plugin "copyfilelocation" -download_plugin "dragdropselected" -download_plugin "fontconfig" -download_plugin "force_syntax" -download_plugin "lfautoinsert" -download_plugin "markers" -download_plugin "memoryusage" -download_plugin "minimap" -download_plugin "navigate" -download_plugin "openselected" -download_plugin "restoretabs" -download_plugin "smoothcaret" - -# echo "- eofnewline-xl" -# curl -s "https://raw.githubusercontent.com/bokunodev/lite_modules/master/plugins/eofnewline-xl.lua" \ -# > "$dest_share_subdir/plugins/eofnewline-xl.lua" - -echo "- language_env" -curl -s "https://raw.githubusercontent.com/anthonyaxenov/lite-xl-env-syntax/master/language_env.lua" \ - > "$dest_share_subdir/plugins/language_env.lua" - -echo "- language_ignore" -curl -s "https://raw.githubusercontent.com/anthonyaxenov/lite-xl-ignore-syntax/master/language_ignore.lua" \ - > "$dest_share_subdir/plugins/language_ignore.lua" - -# echo "- language-containerfile" -# git clone -q "https://github.com/FilBot3/lite-xl-language-containerfile.git" \ -# "$dest_share_subdir/plugins/language_containerfile" - echo echo "Finish!" -echo "- $dest_bin_dir/lite-xl" -echo "- $dest_share_subdir" echo