mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-06-14 11:51:42 +00:00
[#23] Rename plugins to modules
This commit is contained in:
16
modules/dpkg/functions/apt-copy
Normal file
16
modules/dpkg/functions/apt-copy
Normal file
@ -0,0 +1,16 @@
|
||||
#
|
||||
# Generates a script that can be used to duplicate a dpkg-based system.
|
||||
#
|
||||
# Authors:
|
||||
# Daniel Bolton <danielbarrettbolton@gmail.com>
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
print '#!/bin/sh'"\n" > apt-copy.sh
|
||||
|
||||
list=$(perl -m'AptPkg::Cache' -e '$c=AptPkg::Cache->new; for (keys %$c){ push @a, $_ if $c->{$_}->{'CurrentState'} eq 'Installed';} print "$_ " for sort @a;')
|
||||
|
||||
print 'aptitude install '"$list\n" >> apt-copy.sh
|
||||
|
||||
chmod +x apt-copy.sh
|
||||
|
37
modules/dpkg/functions/apt-history
Normal file
37
modules/dpkg/functions/apt-history
Normal file
@ -0,0 +1,37 @@
|
||||
#
|
||||
# Displays dpkg history.
|
||||
#
|
||||
# Authors:
|
||||
# Peter Leung <commandolinux@gmail.com>
|
||||
# Benjamin Boudreau <boudreau.benjamin@gmail.com>
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
case "$1" in
|
||||
(install)
|
||||
zgrep --no-filename 'install ' $(ls -rt /var/log/dpkg*)
|
||||
;;
|
||||
(upgrade|remove)
|
||||
zgrep --no-filename $1 $(ls -rt /var/log/dpkg*)
|
||||
;;
|
||||
(rollback)
|
||||
zgrep --no-filename upgrade $(ls -rt /var/log/dpkg*) | \
|
||||
grep "$2" -A10000000 | \
|
||||
grep "$3" -B10000000 | \
|
||||
awk '{print $4"="$5}'
|
||||
;;
|
||||
(list)
|
||||
zcat $(ls -rt /var/log/dpkg*)
|
||||
;;
|
||||
(*)
|
||||
cat >&2 <<EOF
|
||||
Commands:
|
||||
install - List installed packages
|
||||
upgrade - List upgraded packages
|
||||
remove - List removed packages
|
||||
rollback - List rollback information
|
||||
list - Display contents of dpkg logs
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
|
17
modules/dpkg/functions/dbb-build
Normal file
17
modules/dpkg/functions/dbb-build
Normal file
@ -0,0 +1,17 @@
|
||||
#
|
||||
# Makes a dpkg Linux kernel package.
|
||||
#
|
||||
# Authors:
|
||||
# Daniel Bolton <dbb@9y.com>
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
MAKEFLAGS='' # Temporarily unset MAKEFLAGS ('-j3' will fail).
|
||||
appendage='-custom' # Displayed in $(uname -r).
|
||||
revision=$(date +"%Y%m%d") # Displayed in the dpkg package file name.
|
||||
|
||||
make-kpkg clean
|
||||
|
||||
time fakeroot make-kpkg --append-to-version "$appendage" --revision \
|
||||
"$revision" kernel_image kernel_headers
|
||||
|
Reference in New Issue
Block a user