20 lines
391 B
Bash
Executable File
20 lines
391 B
Bash
Executable File
#!/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
|