mirror of
https://github.com/aljazceru/omakub.git
synced 2025-12-18 21:14:21 +01:00
Fix confirmation not setting booleans
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
# Install default programming languages
|
# Install default programming languages
|
||||||
if [[ -v OMAKUB_FIRST_RUN_LANGUAGES ]]; then
|
if [[ -v OMAKUB_FIRST_RUN_LANGUAGES ]]; then
|
||||||
languages=$OMAKUB_FIRST_RUN_LANGUAGES
|
languages=$OMAKUB_FIRST_RUN_LANGUAGES
|
||||||
else
|
else
|
||||||
AVAILABLE_LANGUAGES=("Ruby on Rails" "Node.js" "Go" "PHP" "Python" "Elixir" "Rust" "Java")
|
AVAILABLE_LANGUAGES=("Ruby on Rails" "Node.js" "Go" "PHP" "Python" "Elixir" "Rust" "Java")
|
||||||
languages=$(gum choose "${AVAILABLE_LANGUAGES[@]}" --no-limit --height 10 --header "Select programming languages")
|
languages=$(gum choose "${AVAILABLE_LANGUAGES[@]}" --no-limit --height 10 --header "Select programming languages")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install_extras=$(gum confirm "Would you like to enable the LazyVIM extras plugins (if available) too?")
|
install_extras=$(gum confirm "Would you like to enable the LazyVIM extras plugins (if available) too?" && echo true || echo false)
|
||||||
|
|
||||||
enable_lazyvim_extras() {
|
enable_lazyvim_extras() {
|
||||||
local config_file="$HOME/.config/nvim/lazyvim.json"
|
local config_file="$HOME/.config/nvim/lazyvim.json"
|
||||||
@@ -21,44 +21,44 @@ enable_lazyvim_extras() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [[ -n "$languages" ]]; then
|
if [[ -n "$languages" ]]; then
|
||||||
for language in $languages; do
|
for language in $languages; do
|
||||||
case $language in
|
case $language in
|
||||||
Ruby)
|
Ruby)
|
||||||
mise use --global ruby@latest
|
mise use --global ruby@latest
|
||||||
mise x ruby -- gem install rails --no-document
|
mise x ruby -- gem install rails --no-document
|
||||||
;;
|
;;
|
||||||
Node.js)
|
Node.js)
|
||||||
mise use --global node@lts
|
mise use --global node@lts
|
||||||
$install_extras && enable_lazyvim_extras "lazyvim.plugins.extras.lang.typescript"
|
$install_extras && enable_lazyvim_extras "lazyvim.plugins.extras.lang.typescript"
|
||||||
;;
|
;;
|
||||||
Go)
|
Go)
|
||||||
mise use --global go@latest
|
mise use --global go@latest
|
||||||
$install_extras && enable_lazyvim_extras "lazyvim.plugins.extras.lang.go"
|
$install_extras && enable_lazyvim_extras "lazyvim.plugins.extras.lang.go"
|
||||||
;;
|
;;
|
||||||
PHP)
|
PHP)
|
||||||
sudo add-apt-repository -y ppa:ondrej/php
|
sudo add-apt-repository -y ppa:ondrej/php
|
||||||
sudo apt -y install php8.4 php8.4-{curl,apcu,intl,mbstring,opcache,pgsql,mysql,sqlite3,redis,xml,zip}
|
sudo apt -y install php8.4 php8.4-{curl,apcu,intl,mbstring,opcache,pgsql,mysql,sqlite3,redis,xml,zip}
|
||||||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||||
php composer-setup.php --quiet && sudo mv composer.phar /usr/local/bin/composer
|
php composer-setup.php --quiet && sudo mv composer.phar /usr/local/bin/composer
|
||||||
rm composer-setup.php
|
rm composer-setup.php
|
||||||
$install_extras && enable_lazyvim_extras "lazyvim.plugins.extras.lang.php"
|
$install_extras && enable_lazyvim_extras "lazyvim.plugins.extras.lang.php"
|
||||||
;;
|
;;
|
||||||
Python)
|
Python)
|
||||||
mise use --global python@latest
|
mise use --global python@latest
|
||||||
;;
|
;;
|
||||||
Elixir)
|
Elixir)
|
||||||
mise use --global erlang@latest
|
mise use --global erlang@latest
|
||||||
mise use --global elixir@latest
|
mise use --global elixir@latest
|
||||||
mise x elixir -- mix local.hex --force
|
mise x elixir -- mix local.hex --force
|
||||||
$install_extras && enable_lazyvim_extras "lazyvim.plugins.extras.lang.elixir" "lazyvim.plugins.extras.lang.erlang"
|
$install_extras && enable_lazyvim_extras "lazyvim.plugins.extras.lang.elixir" "lazyvim.plugins.extras.lang.erlang"
|
||||||
;;
|
;;
|
||||||
Rust)
|
Rust)
|
||||||
bash -c "$(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs)" -- -y
|
bash -c "$(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs)" -- -y
|
||||||
$install_extras && enable_lazyvim_extras "lazyvim.plugins.extras.lang.rust"
|
$install_extras && enable_lazyvim_extras "lazyvim.plugins.extras.lang.rust"
|
||||||
;;
|
;;
|
||||||
Java)
|
Java)
|
||||||
mise use --global java@latest
|
mise use --global java@latest
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user