From f25d215b239fed46970a4df1e2f227b95c08caf8 Mon Sep 17 00:00:00 2001 From: Cyrille L Date: Wed, 23 Mar 2022 17:06:34 +0100 Subject: [PATCH] Fix: check + setup (testing) --- setup.sh | 15 +++++++++------ var/lib/upd/scripts/check | 2 ++ var/lib/upd/setup.sh | 15 +++++++++------ 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/setup.sh b/setup.sh index 02abbee..d3b2ab4 100644 --- a/setup.sh +++ b/setup.sh @@ -70,7 +70,10 @@ do echo -ne " Owner $setup_user:" sudo chown -R "$setup_user":"$setup_user" "$setup_folder" \ && cmd_res="$?" \ - && setup__check_err + && setup__check_err + sudp cp -rf "$setup_folder" \ + && cmd_res="$?" \ + && setup__check_err done echo "- Folder: $setup_dir_bin" echo -ne " Created:" @@ -78,15 +81,15 @@ sudo mkdir -p "$setup_dir_bin" \ && cmd_res="$?" \ && setup__check_err echo "- File: $setup_file_bin" -echo -ne " Copy:" -sudo cp "$PWD$set_bin_uri" \ - "$set_bin_uri" \ - && cmd_res="$?" \ - && setup__check_err echo -ne " Owner $setup_user:" sudo chown "$setup_user":"$setup_user" "$set_bin_uri" \ && cmd_res="$?" \ && setup__check_err +echo -ne " Copy:" +sudo cp -f "$PWD$set_bin_uri" \ + "$set_bin_uri" \ + && cmd_res="$?" \ + && setup__check_err sudo chmod 755 "$set_bin_uri" echo -e "\n# Thank you for installing upd. Have fun !" diff --git a/var/lib/upd/scripts/check b/var/lib/upd/scripts/check index ca43c8a..092fd73 100644 --- a/var/lib/upd/scripts/check +++ b/var/lib/upd/scripts/check @@ -64,12 +64,14 @@ case "$arch" in esac C_NBR=${C_Green} +upd_nbr=0 upd_nbr=`cat "$upd_file_check" | wc -l` (( $upd_nbr > 0 )) \ && C_NBR=${C_Yellow} \ && upd__show "$upd_file_check" # archlinux aur +upd_nbr_aur=0 if [[ "$aur" == "yay" ]];then C_NBR_aur=${C_Green} upd_nbr_aur=`cat "$upd_file_check_aur" | wc -l` diff --git a/var/lib/upd/setup.sh b/var/lib/upd/setup.sh index 02abbee..d3b2ab4 100644 --- a/var/lib/upd/setup.sh +++ b/var/lib/upd/setup.sh @@ -70,7 +70,10 @@ do echo -ne " Owner $setup_user:" sudo chown -R "$setup_user":"$setup_user" "$setup_folder" \ && cmd_res="$?" \ - && setup__check_err + && setup__check_err + sudp cp -rf "$setup_folder" \ + && cmd_res="$?" \ + && setup__check_err done echo "- Folder: $setup_dir_bin" echo -ne " Created:" @@ -78,15 +81,15 @@ sudo mkdir -p "$setup_dir_bin" \ && cmd_res="$?" \ && setup__check_err echo "- File: $setup_file_bin" -echo -ne " Copy:" -sudo cp "$PWD$set_bin_uri" \ - "$set_bin_uri" \ - && cmd_res="$?" \ - && setup__check_err echo -ne " Owner $setup_user:" sudo chown "$setup_user":"$setup_user" "$set_bin_uri" \ && cmd_res="$?" \ && setup__check_err +echo -ne " Copy:" +sudo cp -f "$PWD$set_bin_uri" \ + "$set_bin_uri" \ + && cmd_res="$?" \ + && setup__check_err sudo chmod 755 "$set_bin_uri" echo -e "\n# Thank you for installing upd. Have fun !"