/useful/trunk-1

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/useful/trunk-1

« back to all changes in this revision

Viewing changes to scripts/do-offline-updates.sh

  • Committer: Gustav Hartvigsson
  • Date: 2024-09-30 19:22:26 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20240930192226-1pwn3bnp0c09g2za
* fixed this... Finally.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
52
52
 
53
53
function __check_for_updates () {
54
 
  __silentpkcon get-updates
 
54
  __silent pkcon get-updates
55
55
  if [[ $? == 0 ]]; then
56
56
    echo "Updates are available!"
57
57
    echo ""
58
58
    __UPDATES_AVAILABLE=true
 
59
    echo "Updates available."
59
60
  else
60
61
    __UPDATES_AVAILABLE=false
 
62
    echo "No updates available."
61
63
  fi
62
64
}
63
65
 
66
68
  if [[ $? == 0 ]];then
67
69
    __UPDATES_AVAILABLE=true
68
70
  else
69
 
    ## huh?
70
71
    __UPDATES_AVAILABLE=false
71
72
  fi
72
73
 
77
78
}
78
79
 
79
80
function __parse_args () {
80
 
 
81
 
  if [[ -z "$1" ]]
82
 
  then
83
 
    echo "Try --help or -h."
84
 
    exit 1
85
 
  fi
86
 
  
87
81
  while [[ $# -gt 0 ]]
88
82
  do
89
83
    case $1 in
115
109
}
116
110
 
117
111
function __main () {
118
 
  __satity_check
 
112
  __sanity_check
119
113
  __parse_args $@
 
114
  __check_for_updates
120
115
 
121
116
  if [[ ( __DO_DOWNLOAD == true ) && ( __UPDATE_AVAILABLE == true ) ]]; then
122
117
    __do_download