Create a deploykernel.zsh script
For building the current kernel and deploying it onto a VM Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
e615a2d36b
commit
04927311ef
|
@ -0,0 +1,8 @@
|
|||
#compdef deploykernel.zsh
|
||||
|
||||
function _deploykernel.zsh() {
|
||||
_arguments \
|
||||
':destination: _alternative
|
||||
"hosts:hosts: _ssh_hosts"
|
||||
"domains:domains:($(virsh list --all --name))"'
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/zsh -e
|
||||
autoload colors
|
||||
colors
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: $0 {remote host}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
makepkg -f
|
||||
deploypkg.zsh $(makepkg --packagelist) $1
|
||||
|
||||
pkgname=$(grep ^pkgname PKGBUILD | awk -F= '{print $2}')
|
||||
title=$(ssh.zsh $1 grub-list.zsh -e | grep $pkgname$)
|
||||
ssh.zsh $1 "sudo grub-reboot \"$title\""
|
||||
|
||||
echo
|
||||
vm.zsh reboot $1
|
||||
echo $fg_bold[cyan]$(ssh.zsh $1 uname -rsn)$reset_color
|
Loading…
Reference in New Issue