mirror of
https://github.com/Xevion/dotfiles.git
synced 2025-12-11 02:07:04 -06:00
use --help to ensure exit code is 0, add --no-confirm for rbw install
This commit is contained in:
6
.install-password-manager.sh
Normal file → Executable file
6
.install-password-manager.sh
Normal file → Executable file
@@ -4,14 +4,14 @@ type rbw >/dev/null 2>&1 && exit
|
|||||||
|
|
||||||
install_cargo_binstall() {
|
install_cargo_binstall() {
|
||||||
# Test if cargo binstall is installed
|
# Test if cargo binstall is installed
|
||||||
cargo binstall
|
cargo binstall --help
|
||||||
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
|
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
|
||||||
@@ -21,7 +21,7 @@ install_cargo_binstall() {
|
|||||||
install_rbw() {
|
install_rbw() {
|
||||||
# Test if rbw is installed
|
# Test if rbw is installed
|
||||||
command -v rbw >/dev/null 2>&1 && return
|
command -v rbw >/dev/null 2>&1 && return
|
||||||
cargo binstall rbw
|
cargo binstall rbw --no-confirm
|
||||||
|
|
||||||
# Test again
|
# Test again
|
||||||
command -v rbw >/dev/null 2>&1
|
command -v rbw >/dev/null 2>&1
|
||||||
|
|||||||
Reference in New Issue
Block a user