You are not logged in.

#1 2009-04-29 16:38:09

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

audio pkg update notifier

I was just playing around with flite when I made this but someone might find it useful/interesting/amusing.

The dependencies are listed at the top of the file. There are lines that you can uncomment for example output if you have no pending upgrades.

#!/bin/bash

##################################
## Dependencies:                ##
##   bash-xyne-common_functions ##
##   flite                      ##
##################################

source /usr/share/xyne/bash/common_functions

function narrate {
  TYPE=$1
  shift
  PKGS=$@
  if [ -z $PKGS ]; then
    flite "There are no upgradable $TYPE packages."
  else
    flite "The following $TYPE packages are upgradable."
    for PKG in ${PKGS[@]}; do
      PKGNAME=$(get_package_name $PKG)
      PKGVER=$(get_package_version $PKG | sed 's/-/ dash /')
      flite "$PKGNAME version $PKGVER"
    done
  fi
}

# uncomment these 2 lines for example output if no upgrades are available
#narrate 'example' 'foo-4.6-1.1' 'bar-3.2-2' 'baz-0.04-2'
#exit

# check the repos
narrate 'repo' $(get_upgradable_repo_pkgs)

# check the aur
flite "Please wait while I check the AUR."
narrate 'AUR' $(get_upgradable_aur_pkgs)

Last edited by Xyne (2009-04-29 16:38:39)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB