From ad32cb996bffa874d85ee201184ceb7b7f05f0b0 Mon Sep 17 00:00:00 2001 From: doryan Date: Thu, 13 Feb 2025 00:16:13 +0400 Subject: [PATCH] feat(script): installation script is done --- install.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index 7052fb5..01060fb 100755 --- a/install.sh +++ b/install.sh @@ -1,8 +1,8 @@ #!/bin/bash function install_config() { - for config in $1; do - cp -vr "${config}" "$2" + for config in ${@:2}; do + cp -vr "./${config}" "$1" done } @@ -31,23 +31,23 @@ read type case "${type}" in "L" | "l") - install_config $(ls -d -1 "$PWD/"Laptop/*) ~/.config/ + cp -vrf ./Laptop/* ~/.config/ ;; "P" | "p") - install_config $(ls -d -1 "$PWD/"PC/*) ~/.config/ + cp -vrf ./PC/* ~/.config/ ;; *) echo "Please, select your device type correctly" - kill "$PID" + exit 1 ;; esac -install_config ${general_configs[@]} ~/.config/ -install_config ${home_dir_configs[@]} ~/ +install_config ~/.config/ ${general_configs[@]} +install_config ~/ ${home_dir_configs[@]} betterlockscreen -u ~/.bg/bg_5.png --fx blur --blur 1 -echo "Do you want install custom bspwm xsession to /usr/share/xsessions/? It's needs to become root (Y/N):" +echo "Do you want install custom bspwm xsession to /usr/share/xsessions/? It needs to become root (Y/N):" read advanced_install case "${advanced_install}" in @@ -58,7 +58,7 @@ case "${advanced_install}" in echo "Skip" ;; *) - echo "Please, select your device type correctly" - kill "$PID" + echo "Please, select your answer correctly" + exit 1 ;; esac