mirror of
https://github.com/Xevion/dotfiles.git
synced 2025-12-07 18:06:48 -06:00
Fix before-source-state exiting early, silence apt update, silence binstall --help, add inotify install
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
type rbw >/dev/null 2>&1 && exit
|
||||
set -eu
|
||||
|
||||
apt_update() {
|
||||
# Only run apt update once
|
||||
@@ -8,12 +7,12 @@ apt_update() {
|
||||
return
|
||||
fi
|
||||
|
||||
sudo apt update
|
||||
sudo apt update >/dev/null
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to update apt"
|
||||
exit 1
|
||||
else
|
||||
else
|
||||
touch /tmp/.apt-updated
|
||||
fi
|
||||
}
|
||||
@@ -29,7 +28,7 @@ install_age() {
|
||||
|
||||
install_cargo_binstall() {
|
||||
# Test if cargo binstall is installed
|
||||
cargo binstall --help
|
||||
cargo binstall --help >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
return
|
||||
fi
|
||||
@@ -54,8 +53,17 @@ install_rbw() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
install_inotify() {
|
||||
if ! dpkg -l inotify-tools >/dev/null 2>&1; then
|
||||
echo "Installing inotify-tools"
|
||||
apt_update
|
||||
sudo apt install inotify-tools
|
||||
fi
|
||||
}
|
||||
|
||||
install_inotify
|
||||
install_age
|
||||
install_cargo_binstall
|
||||
install_rbw
|
||||
rbw login
|
||||
rbw sync
|
||||
rbw sync
|
||||
|
||||
Reference in New Issue
Block a user