Refactor setup script to ensure 'mise' is installed after dependency checks

This commit is contained in:
atish23
2025-09-16 16:40:15 +05:30
parent 2d1c6e3c96
commit 2d8884bbe6

View File

@@ -32,16 +32,24 @@ end
FileUtils.chdir APP_ROOT do
puts "== Installing dependencies =="
system "mise install"
if installed?("brew")
system "brew install sqlite ffmpeg"
system "brew install sqlite ffmpeg mise"
elsif installed?("pacman")
system "sudo pacman -S --noconfirm --needed sqlite ffmpeg"
system "sudo pacman -S --noconfirm --needed sqlite ffmpeg mise"
elsif installed?("apt")
system "sudo apt-get install --no-install-recommends -y libsqlite3-0 ffmpeg"
end
if installed?("mise")
system "mise install"
else
puts "Couldn't install mise"
puts "Install mise using your package manager or via:"
puts "https://mise.jdx.dev/installing-mise.html"
exit 1
end
system("bundle check") || system!("bundle install")
puts "\n== Preparing database =="