User Tools

Site Tools


pages:howtos:tmux:runnig_updates_in_tmux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
pages:howtos:tmux:runnig_updates_in_tmux [2022/04/13 16:56] – [Sources] mischerhpages:howtos:tmux:runnig_updates_in_tmux [2022/06/19 17:07] (current) – [Implementation] mischerh
Line 6: Line 6:
   * update git repositories   * update git repositories
   * update flatpak packages   * update flatpak packages
-  * update snap packages+  * <del>update snap packages</del> (it seems like snaps will get updated automatically)
  
 ===== Sources ===== ===== Sources =====
Line 30: Line 30:
 install -bD --owner=root --group=root --mode=0750 -T <(cat << 'EOF' install -bD --owner=root --group=root --mode=0750 -T <(cat << 'EOF'
 #!/bin/bash #!/bin/bash
 +  
 # debug # debug
-set -x +#set -x 
 +  
 +declare _updatecommand 
 +declare _flatpak_updatecommand 
 +declare _gitup_user_updatecommand
 declare _osvendor declare _osvendor
 declare _highlevelpackagemanager declare _highlevelpackagemanager
-declare _updatecommand +declare _os_updatecommand 
 +  
 +_flatpak_updatecommand="flatpak --system update -y" 
 +_gitup_user_updatecommand="sudo -u def python3.8 /home/def/.local/bin/gitup" 
 +  
 if [ ! command -v lsb-release >/dev/null 2>&1 ] && [ ! command -v lsb_release >/dev/null 2>&1 ]  if [ ! command -v lsb-release >/dev/null 2>&1 ] && [ ! command -v lsb_release >/dev/null 2>&1 ] 
 then  then 
Line 43: Line 49:
     exit 1;     exit 1;
 fi fi
 +  
 _osvendor="$( lsb-release -is )" _osvendor="$( lsb-release -is )"
- +   
 +  
 case $_osvendor in case $_osvendor in
     openSUSE)     openSUSE)
         _highlevelpackagemanager="$( command -v zypper )"         _highlevelpackagemanager="$( command -v zypper )"
-        _updatecommand="${_highlevelpackagemanager} ref && ${_highlevelpackagemanager} dup -y"+        _os_updatecommand="${_highlevelpackagemanager} ref && ${_highlevelpackagemanager} dup"
         ;;         ;;
-        +          
     Debian)     Debian)
         _highlevelpackagemanager="$( command -v apt )"         _highlevelpackagemanager="$( command -v apt )"
-        _updatecommand="${_highlevelpackagemanager} update && ${_highlevelpackagemanager} -y upgrade && ${_highlevelpackagemanager} -y full-upgrade"+        _os_updatecommand="${_highlevelpackagemanager} update && ${_highlevelpackagemanager} -y upgrade && ${_highlevelpackagemanager} -y full-upgrade"
         ;;         ;;
 +  
     *)     *)
-        echo >&2 "ERROR: Your operating system vendor (${_osvendor}) is not supported. Aborting."+        echo >&2 "ERROR: Your operating system (${_osvendor}) is not supported. Aborting."
         exit 1         exit 1
         ;;         ;;
 esac esac
- +  
 +_updatecommand="${_flatpak_updatecommand} && ${_gitup_user_updatecommand} && ${_os_updatecommand}" 
 + 
 tmux new -s sysupdate -d tmux new -s sysupdate -d
 tmux send-keys -t sysupdate "${_updatecommand}" C-m tmux send-keys -t sysupdate "${_updatecommand}" C-m
Line 92: Line 99:
 gitup --add ~/repos/ gitup --add ~/repos/
 </sxh> </sxh>
- 
-todo.... 
-sudo -u <USERNAME> /home/<USERNAME>/.local/bin/gitup 
  
 <sxh bash; gutter: false> <sxh bash; gutter: false>
pages/howtos/tmux/runnig_updates_in_tmux.1649868962.txt.gz · Last modified: 2022/04/13 16:56 by mischerh