aboutsummaryrefslogtreecommitdiff
path: root/cloneDotfiles.sh
diff options
context:
space:
mode:
authorLibravatar blueingreen68 <blueingreen68@gmail.com>2024-01-23 14:12:51 +0500
committerLibravatar blueingreen68 <blueingreen68@gmail.com>2024-01-23 14:12:51 +0500
commite3dba9fb736330878caf947e39171455c5b3044f (patch)
tree5fd9daac3f2d52444b806b222fb8a0395a823d5e /cloneDotfiles.sh
parent9b6884cdbc96bdd0ab0648b454b1ad0f9e21edaa (diff)
update getKeepassFile.sh
Diffstat (limited to 'cloneDotfiles.sh')
-rwxr-xr-xcloneDotfiles.sh50
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