]>
gitweb.pimeys.fr Git - config-20-100.git/blob - .zsh/rc/local/30_debian_tools
4 if [[ -r /etc
/debian_version
]] ; then
6 #f3# Execute \kbd{apt-get update \&\& }\\&\quad \kbd{apt-get dist-upgrade}
11 $SUDO apt-get
-u upgrade
13 ssh $1 $SUDO apt-get update
14 # ask before the upgrade
16 ssh $1 $SUDO apt-get
--no-act upgrade
17 echo -n 'Process the upgrade?'
19 if [[ $dummy == "y" ]] ; then
20 ssh $1 $SUDO apt-get
-u upgrade
--yes
26 # TODO: Is it supported to use pager settings like this?
27 # PAGER='less -Mr' - If so, the use of $PAGER here needs fixing
28 # with respect to wordsplitting. (ie. ${=PAGER})
29 if check_com
-c $PAGER ; then
30 #f1# View Debian's changelog of a given package
33 if [[ -r /usr
/share
/doc
/$1/changelog.Debian.gz
]] ; then
34 zcat
/usr
/share
/doc
/$1/changelog.Debian.gz |
$PAGER
35 elif [[ -r /usr
/share
/doc
/$1/changelog.gz
]] ; then
36 zcat
/usr
/share
/doc
/$1/changelog.gz |
$PAGER
38 if check_com
-c aptitude
; then
39 echo "No changelog for package $1 found, using aptitude to retrieve it."
42 echo "No changelog for package $1 found, sorry."
47 _dchange
() { _files
-W /usr
/share
/doc
-/ }
48 compdef _dchange dchange
50 #f1# View Debian's NEWS of a given package
53 if [[ -r /usr
/share
/doc
/$1/NEWS.Debian.gz
]] ; then
54 zcat
/usr
/share
/doc
/$1/NEWS.Debian.gz |
$PAGER
55 elif [[ -r /usr
/share
/doc
/$1/NEWS.gz
]] ; then
56 zcat
/usr
/share
/doc
/$1/NEWS.gz |
$PAGER
58 echo "No NEWS file for package $1 found, sorry."
62 _dnews
() { _files
-W /usr
/share
/doc
-/ }
65 #f1# View upstream's changelog of a given package
68 if [[ -r /usr
/share
/doc
/$1/changelog.gz
]] ; then
69 zcat
/usr
/share
/doc
/$1/changelog.gz |
$PAGER
71 echo "No changelog for package $1 found, sorry."
75 _uchange
() { _files
-W /usr
/share
/doc
-/ }
76 compdef _uchange uchange