mirror of
https://github.com/Xevion/dotfiles.git
synced 2025-12-07 20:06:51 -06:00
Remove rbw installer, disable cargo binstall, add doppler & deno installer steps
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
# Flag variables
|
||||||
|
LATE_FAIL_EXIT=false # Set to true if any installation fails, but only raise an exit at the end
|
||||||
|
DOPPLER_UNAVAILABLE=false # Set to true if Doppler is not available
|
||||||
|
|
||||||
apt_update() {
|
apt_update() {
|
||||||
# Only run apt update once
|
# Only run apt update once
|
||||||
if [ -f /tmp/.apt-updated ]; then
|
if [ -f /tmp/.apt-updated ]; then
|
||||||
@@ -10,7 +14,7 @@ apt_update() {
|
|||||||
sudo apt update >/dev/null
|
sudo apt update >/dev/null
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Failed to update apt"
|
echo "chezmoi: Critical issue - failed to update apt!"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
touch /tmp/.apt-updated
|
touch /tmp/.apt-updated
|
||||||
@@ -26,32 +30,21 @@ install_age() {
|
|||||||
sudo apt install age
|
sudo apt install age
|
||||||
}
|
}
|
||||||
|
|
||||||
install_cargo_binstall() {
|
# install_cargo_binstall() {
|
||||||
# Test if cargo binstall is installed
|
# # Test if cargo binstall is installed
|
||||||
cargo binstall --help >/dev/null 2>&1
|
# cargo binstall --help >/dev/null 2>&1
|
||||||
if [ $? -eq 0 ]; then
|
# if [ $? -eq 0 ]; then
|
||||||
return
|
# return
|
||||||
fi
|
# fi
|
||||||
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
# curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||||
|
|
||||||
# Test again
|
# # Test again
|
||||||
cargo binstall --help
|
# cargo binstall --help
|
||||||
if [ $? -ne 0 ]; then
|
# if [ $? -ne 0 ]; then
|
||||||
echo "Failed to install cargo binstall"
|
# echo "Failed to install cargo binstall"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
# fi
|
||||||
}
|
# }
|
||||||
|
|
||||||
install_rbw() {
|
|
||||||
# Test if rbw is installed
|
|
||||||
command -v rbw >/dev/null 2>&1 && return
|
|
||||||
cargo binstall rbw --no-confirm
|
|
||||||
|
|
||||||
# Test again
|
|
||||||
command -v rbw >/dev/null 2>&1 && return
|
|
||||||
echo "Failed to install rbw"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
install_inotify() {
|
install_inotify() {
|
||||||
if ! dpkg -l inotify-tools >/dev/null 2>&1; then
|
if ! dpkg -l inotify-tools >/dev/null 2>&1; then
|
||||||
@@ -61,9 +54,34 @@ install_inotify() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_doppler() {
|
||||||
|
if ! command -v doppler >/dev/null 2>&1; then
|
||||||
|
echo "You need to install the Doppler CLI manually (for security purposes)."
|
||||||
|
echo "https://docs.doppler.com/docs/cli#installation"
|
||||||
|
|
||||||
|
DOPPLER_UNAVAILABLE=true
|
||||||
|
INSTALLATION_FAILED=true
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
require_doppler_login() {
|
||||||
|
doppler me >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "You need to login to Doppler."
|
||||||
|
echo "https://docs.doppler.com/docs/cli#logging-in"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
install_deno() {
|
||||||
|
if ! command -v deno >/dev/null 2>&1; then
|
||||||
|
echo "Installing Deno"
|
||||||
|
curl -fsSL https://deno.land/install.sh | sh
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
install_inotify
|
install_inotify
|
||||||
install_age
|
install_age
|
||||||
install_cargo_binstall
|
# install_cargo_binstall
|
||||||
# install_rbw
|
if [ $DOPPLER_UNAVAILABLE = false ]; then
|
||||||
# rbw login
|
install_doppler
|
||||||
# rbw sync
|
fi
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
nodejs 22.11.0
|
nodejs 22.11.0
|
||||||
zoxide 0.9.6
|
zoxide 0.9.6
|
||||||
|
deno 2.2.2
|
||||||
|
|||||||
Reference in New Issue
Block a user