Version 0.1.6
This commit is contained in:
parent
df4fe68228
commit
ead5328065
|
@ -0,0 +1,14 @@
|
|||
# Changelog
|
||||
|
||||
UPD: Little tool to check and show system updates (archlinux, debian)
|
||||
- Repository: https://git.a-lec.org/echolib/upd
|
||||
- Issues: https://git.a-lec.org/echolib/upd/-/issues
|
||||
- Changelog: https://git.a-lec.org/echolib/upd/-/blob/main/CHANGELOG.md
|
||||
- License: https://git.a-lec.org/echolib/upd/-/blob/main/LICENSE
|
||||
|
||||
## [0.1.6]
|
||||
### Fix
|
||||
- exit after checking for available new upd, stopping other jobs
|
||||
|
||||
### add
|
||||
- Settings colors in conf file
|
|
@ -24,3 +24,17 @@ upd_script_upgrader="/var/lib/upd/scripts/upgrader"
|
|||
# Onlinde Repo
|
||||
repo="https://git.a-lec.org/echolib/upd/-/raw/main/usr/local/bin/upd"
|
||||
repo_tar="https://git.a-lec.org/echolib/upd/-/archive/main/upd-main.tar.gz"
|
||||
|
||||
|
||||
#======================================================================
|
||||
# Set Colors
|
||||
#======================================================================
|
||||
NC="\e[0m"
|
||||
C_Blue="\e[34m"
|
||||
C_Cyan="\e[36m"
|
||||
C_Green="\e[32m"
|
||||
C_Grey="\e[2m"
|
||||
C_Pink="\e[35m"
|
||||
C_Red="\e[31m"
|
||||
C_White="\e[1m"
|
||||
C_Yellow="\e[33m"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
# version: 0.1.5
|
||||
# version: 0.1.6
|
||||
# file: upd
|
||||
# Folder: /usr/local/bin
|
||||
# By echolib
|
||||
|
@ -43,6 +43,7 @@ if ! [[ -d "$1" ]];then
|
|||
make)
|
||||
mkdir -p "$1"
|
||||
if__folder "$1" check
|
||||
exit
|
||||
;;
|
||||
|
||||
check)
|
||||
|
@ -66,7 +67,7 @@ elif [[ `command -v pacman` ]];then
|
|||
arch="pacman"
|
||||
if__command "checkupdates"
|
||||
[[ `command -v yay` ]] \
|
||||
&& aur=yay
|
||||
&& aur="yay"
|
||||
|
||||
else
|
||||
echo "! upd is not yet ready for this System"
|
||||
|
@ -101,7 +102,8 @@ case "$1" in
|
|||
clean|-C) clean__OPTIONS ;;
|
||||
-cr) upd_cr=true;upd__check_reboot ;;
|
||||
list|-l) upd__list ;;
|
||||
version|-v) awk 'NR==2 {print "# Installed:",$3}' "/usr/local/bin/upd" ;;
|
||||
version|-v) awk 'NR==2 {print "# Installed:",$3}' \
|
||||
"/usr/local/bin/upd" ;;
|
||||
-vv) script__versions ;;
|
||||
-vvv) verbose=true;script__versions ;;
|
||||
-U) Updater ;;
|
||||
|
@ -112,3 +114,5 @@ case "$1" in
|
|||
-A) sysup="aur";upg__main ;;
|
||||
*) echo "! Bad argument '$1' : see upd --help" ;;
|
||||
esac
|
||||
|
||||
exit
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
# Changelog
|
||||
|
||||
UPD: Little tool to check and show system updates (archlinux, debian)
|
||||
- Repository: https://git.a-lec.org/echolib/upd
|
||||
- Issues: https://git.a-lec.org/echolib/upd/-/issues
|
||||
- Changelog: https://git.a-lec.org/echolib/upd/-/blob/main/CHANGELOG.md
|
||||
- License: https://git.a-lec.org/echolib/upd/-/blob/main/LICENSE
|
||||
|
||||
## [0.1.6]
|
||||
### Fix
|
||||
- exit after checking for available new upd, stopping other jobs
|
||||
|
||||
### add
|
||||
- Settings colors in conf file
|
|
@ -35,7 +35,6 @@ upd__prepare_show
|
|||
# Check for updates from {deb]ian
|
||||
#======================================================================
|
||||
upd__check_deb() {
|
||||
echo
|
||||
sudo apt-get update -qq
|
||||
|
||||
upd_file_tmp_apt=`mktemp`
|
||||
|
@ -67,7 +66,7 @@ upd__prepare_show
|
|||
upd__check_reboot() {
|
||||
|
||||
upd__reboot_set() {
|
||||
upd_reboot="$Pp_Grey ${C_Red}Reboot$NC required ; $upd_uname > $upd_vmlin"
|
||||
upd_reboot="$P_Grey ${C_Red}Reboot$NC required ; $upd_uname > $upd_vmlin"
|
||||
upd_inf="$I_Red"
|
||||
}
|
||||
|
||||
|
@ -87,14 +86,13 @@ case "$arch" in
|
|||
esac
|
||||
|
||||
# Reboot message only: if called from option -cr
|
||||
[[ $upd_cr ]] || exit
|
||||
[[ $upd_cr ]] || return
|
||||
! [[ $upd_reboot ]] \
|
||||
&& echo "# No need to reboot" \
|
||||
&& exit
|
||||
|
||||
echo -e "$upd_reboot"
|
||||
exit 137
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -103,7 +101,7 @@ exit 137
|
|||
#======================================================================
|
||||
upd__prepare_show() {
|
||||
echo -ne "\r\033[2K"
|
||||
upd -vv
|
||||
script__versions
|
||||
echo
|
||||
|
||||
upd__check_reboot
|
||||
|
|
|
@ -25,7 +25,8 @@ if [[ `sort -V <<< "$versions" | tail -1` == $v_cur ]];then
|
|||
&& s_onl=" > online: $v_onl"
|
||||
echo "# $app_name is up to date (version: $v_cur$s_onl)"
|
||||
upd_err=true
|
||||
return 0
|
||||
return
|
||||
|
||||
else
|
||||
echo -e "- $app_name $C_Yellow$v_cur$NC -> $C_Green$v_onl$NC"
|
||||
fi
|
||||
|
|
|
@ -13,7 +13,6 @@ case "$sysup" in
|
|||
system)
|
||||
case "$arch" in
|
||||
pacman)
|
||||
clear
|
||||
upd__check_arch
|
||||
(( $upd_nbr == 0 )) \
|
||||
&& exit
|
||||
|
@ -22,7 +21,6 @@ case "$sysup" in
|
|||
;;
|
||||
|
||||
apt)
|
||||
clear
|
||||
upd__check_deb
|
||||
(( $upd_nbr == 0 )) \
|
||||
&& exit
|
||||
|
|
Loading…
Reference in New Issue