mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-06-14 23:01:42 +00:00
Moved hub into the git plugin.
This commit is contained in:
9
plugins/dpkg/functions/apt-copy
Normal file
9
plugins/dpkg/functions/apt-copy
Normal file
@ -0,0 +1,9 @@
|
||||
# Create a simple script that can be used to 'duplicate' a system.
|
||||
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
|
||||
|
10
plugins/dpkg/functions/dbb-build
Normal file
10
plugins/dpkg/functions/dbb-build
Normal file
@ -0,0 +1,10 @@
|
||||
# Kernel-package building shortcut.
|
||||
MAKEFLAGS='' # Temporarily unset MAKEFLAGS ( '-j3' will fail ).
|
||||
appendage='-custom' # This shows up in $ (uname -r ).
|
||||
revision=$(date +"%Y%m%d") # This shows up in the .deb file name.
|
||||
|
||||
make-kpkg clean
|
||||
|
||||
time fakeroot make-kpkg --append-to-version "$appendage" --revision \
|
||||
"$revision" kernel_image kernel_headers
|
||||
|
@ -1,5 +1,3 @@
|
||||
# Debian ZSH Aliases and Functions
|
||||
|
||||
# Aliases
|
||||
alias as="aptitude -F \"* %p -> %d \n(%v/%V)\" --no-gui --disable-columns search" # Search package.
|
||||
alias ad="sudo apt-get update" # Update packages lists.
|
||||
@ -22,28 +20,3 @@ alias debc='time dpkg-buildpackage -rfakeroot -us -uc'
|
||||
# Remove ALL kernel images and headers EXCEPT the one in use.
|
||||
alias kclean='su -c '\''aptitude remove -P ?and(~i~nlinux-(ima|hea) ?not(~n`uname -r`))'\'' root'
|
||||
|
||||
# Functions
|
||||
|
||||
# Create a simple script that can be used to 'duplicate' a system.
|
||||
function apt-copy() {
|
||||
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
|
||||
}
|
||||
|
||||
# Kernel-package building shortcut.
|
||||
function dbb-build() {
|
||||
MAKEFLAGS='' # Temporarily unset MAKEFLAGS ( '-j3' will fail ).
|
||||
appendage='-custom' # This shows up in $ (uname -r ).
|
||||
revision=$(date +"%Y%m%d") # This shows up in the .deb 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