mirror of
https://github.com/Xevion/dotfiles.git
synced 2025-12-14 08:11:28 -06:00
Add install-password-manager step
This commit is contained in:
@@ -35,3 +35,6 @@ encryption = "age"
|
|||||||
[age]
|
[age]
|
||||||
identity = "/home/xevion/key.txt"
|
identity = "/home/xevion/key.txt"
|
||||||
recipient = "age1s3ctpj9lafl6qwyvd89sn448us7gdzd53d8yyhsc7zny78c0k4sqerrkze"
|
recipient = "age1s3ctpj9lafl6qwyvd89sn448us7gdzd53d8yyhsc7zny78c0k4sqerrkze"
|
||||||
|
|
||||||
|
[hooks.read-source-state.pre]
|
||||||
|
command = ".local/share/chezmoi/.install-password-manager.sh"
|
||||||
|
|||||||
31
.install-password-manager.sh
Normal file
31
.install-password-manager.sh
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
type rbw >/dev/null 2>&1 && exit
|
||||||
|
|
||||||
|
install_cargo_binstall() {
|
||||||
|
# Test if cargo binstall is installed
|
||||||
|
cargo binstall
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||||
|
|
||||||
|
# Test again
|
||||||
|
cargo binstall
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Failed to install cargo binstall"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
install_rbw() {
|
||||||
|
# Test if rbw is installed
|
||||||
|
command -v rbw >/dev/null 2>&1 && return
|
||||||
|
cargo binstall rbw
|
||||||
|
|
||||||
|
# Test again
|
||||||
|
command -v rbw >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
install_cargo_binstall
|
||||||
|
install_rbw
|
||||||
Reference in New Issue
Block a user