aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Степанов Алексей Сергеевич <blueingreen@bluig.xyz>2025-02-14 10:49:32 +0000
committerLibravatar Степанов Алексей Сергеевич <blueingreen@bluig.xyz>2025-02-14 10:49:32 +0000
commitcba4697b1da3dc9452481487104ed180d2368f5a (patch)
treeb6a908f46141c6c5558f59a3e693789648d52c2a
parent40ac304b64dfeb28510012d335963fa420bbe4af (diff)
update clone-dotfiles.sh
-rwxr-xr-xbin/clone-dotfiles.sh (renamed from clone-dotfiles.sh)8
1 files changed, 4 insertions, 4 deletions
diff --git a/clone-dotfiles.sh b/bin/clone-dotfiles.sh
index cbc43f3..ba652d8 100755
--- a/clone-dotfiles.sh
+++ b/bin/clone-dotfiles.sh
@@ -2,7 +2,6 @@
declare -g httpsToken
-export
function setStatusE() {
if [[ "$1" = "on" ]]; then
set -e
@@ -16,13 +15,13 @@ setStatusE "on"
function getKdbxFile() {
read -r passwordFileLink < <("$HOME/.local/bin/yadisk-direct" https://yadi.sk/d/o4TMFnHFobxTsw)
- wget "$passwordFileLink" -O ~/Passwords.kdbx
+ wget "$passwordFileLink" -O "$HOME/Passwords.kdbx"
}
function openKeepass() {
setStatusE "off"
- httpsToken=$(keepassxc-cli show --attribute https-token "$HOME/Passwords.kdbx" soft-serve 0)
+ httpsToken=$(keepassxc-cli show --attributes https-token "$HOME/Passwords.kdbx" soft-serve)
return 0
}
@@ -36,7 +35,7 @@ fi
getKdbxFile
while :; do
- if [[ $(openKeepass) -eq 0 ]]; then
+ if openKeepass; then
setStatusE "on"
break
fi
@@ -44,3 +43,4 @@ done
cd
git clone https://"$httpsToken"@ss.bluig.xyz/.init.git "$HOME/init"
+unset httpsToken