aboutsummaryrefslogtreecommitdiff
path: root/cloneDotfiles.sh
diff options
context:
space:
mode:
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