diff options
| author | 2024-04-19 20:39:45 +0500 | |
|---|---|---|
| committer | 2024-04-19 20:39:45 +0500 | |
| commit | 751ad56290700d9af6d677801b2f14cce373015b (patch) | |
| tree | 4f3f8c483c00a669a3fd57c768a85de64e2162f6 | |
| parent | 5f0591566ae3677701b47968d0843f714cb32d76 (diff) | |
update
| -rwxr-xr-x | cloneDotfiles.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cloneDotfiles.sh b/cloneDotfiles.sh index 4ff7fb4..910ebf3 100755 --- a/cloneDotfiles.sh +++ b/cloneDotfiles.sh @@ -1,6 +1,6 @@ #!/bin/bash -setStatusE () { +function setStatusE () { if [ "$1" = true ]; then set +e else @@ -10,13 +10,13 @@ setStatusE () { setStatusE false -getKdbxFile () { +function getKdbxFile () { read -r passwordFileLink < <("$HOME/.local/bin/yadisk-direct" https://yadi.sk/d/o4TMFnHFobxTsw) wget "$passwordFileLink" -O ~/Passwords.kdbx } -openKeepass () { +function openKeepass () { setStatusE true keepassxc-cli clip ~/Passwords.kdbx github 0 -a token-cli @@ -24,9 +24,9 @@ openKeepass () { pipx install wldhx.yadisk-direct -if [ "$?" -eq 1 ]; then - echo "Ошибка установки wldhx.yadisk-direct... Выход" - exit 1 +if [[ "$?" -eq 1 ]]; then + echo "Ошибка установки wldhx.yadisk-direct... Выход" + exit 1 fi getKdbxFile @@ -34,8 +34,8 @@ getKdbxFile while : do openKeepass - - if [ $? -eq 0 ]; then + + if [[ $? -eq 0 ]]; then setStatusE false echo -e "Пароль скопирован!\n" break @@ -43,5 +43,5 @@ do done cd -git clone https://blueingreen68@github.com/blueingreen68/dotfiles $HOME/.dotfiles +git clone https://blueingreen68@github.com/blueingreen68/dotfiles "$HOME"/.dotfiles wl-copy -c |
