diff options
| author | 2024-01-23 14:12:51 +0500 | |
|---|---|---|
| committer | 2024-01-23 14:12:51 +0500 | |
| commit | e3dba9fb736330878caf947e39171455c5b3044f (patch) | |
| tree | 5fd9daac3f2d52444b806b222fb8a0395a823d5e /cloneDotfiles.sh | |
| parent | 9b6884cdbc96bdd0ab0648b454b1ad0f9e21edaa (diff) | |
update getKeepassFile.sh
Diffstat (limited to 'cloneDotfiles.sh')
| -rwxr-xr-x | cloneDotfiles.sh | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/cloneDotfiles.sh b/cloneDotfiles.sh new file mode 100755 index 0000000..a1fbf6e --- /dev/null +++ b/cloneDotfiles.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +setStatusE () { + if [ "$1" = true ]; then + set +e + else + set -e + fi +} + +setStatusE false + +getKdbxFile () { + read -r passwordFileLink < <(yadisk-direct https://yadi.sk/d/o4TMFnHFobxTsw) + + wget "$passwordFileLink" -O ~/Passwords.kdbx +} + +openKeepass () { + setStatusE true + + keepassxc-cli clip ~/Passwords.kdbx github 0 -a token-cli +} + +cat << EOF +Before start ./cloneDotfiles.sh: + +pipx install wldhx.yadisk-direct +pipx ensurepath +source .bashrc + +and launch ./cloneDotfiles.sh in new foot window +EOF + +getKdbxFile + +while : +do + openKeepass + + if [ $? -eq 0 ]; then + setStatusE false + echo -e "Пароль скопирован!\n" + break + fi +done + +cd +git clone https://blueingreen68@github.com/blueingreen68/dotfiles $HOME/.dotfiles +wl-copy -c |
