scripts

Random scripts
git clone git://git.margiolis.net/scripts.git
Log | Files | Refs | README | LICENSE

commit 5cd272e0e21d778036b275dfe728e2284259e8af
parent 19a4397a508e94c964dd6bc9e7334a2e9e3cb471
Author: Christos Margiolis <christos@margiolis.net>
Date:   Tue, 28 Feb 2023 20:43:05 +0200

new script

Diffstat:
MMakefile | 1+
Agitmail | 14++++++++++++++
Mvmstart | 8++++----
3 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile @@ -11,6 +11,7 @@ TARGS = audl \ docprev \ extr \ fontupd \ + gitmail \ irssi_torconf \ mntdroid \ tmsync \ diff --git a/gitmail b/gitmail @@ -0,0 +1,14 @@ +#!/bin/sh + +usage() +{ + echo "usage: ${0##*/} address commit..." 1>&2 + exit 1 +} + +test $# -ge 2 || usage +addr="${1}" +shift 1 +git send-email \ + --subject-prefix="${PWD##*/}][PATCH" \ + --to=${addr} ${@} diff --git a/vmstart b/vmstart @@ -20,9 +20,9 @@ tap="tap0" vnc="no" uefifile="/usr/local/share/uefi-firmware/BHYVE_UEFI.fd" -# TODO initial setup? +# TODO man page? +# TODO merge vmstart and vmstop to `vm <start/stop> ...`? (find new name in this case) # TODO virtio-blk -# TODO vnc wait? # TODO does grub work properly? while getopts "c:C:d:g:G:i:m:t:uv" arg; do @@ -36,7 +36,7 @@ case "${arg}" in m) mem="${OPTARG}" ;; t) tap="${OPTARG}" ;; u) uefi="-l bootrom,${uefifile}" ;; - v) vnc="yes" ;; + v) vnc="-s 29,fbuf,tcp=0.0.0.0:5900,wait" ;; *) usage ;; esac done @@ -71,7 +71,7 @@ bhyve \ ${img:+-s 3,ahci-cd,${img}} \ -s 4,ahci-hd,${disk} \ -s 5,virtio-net,${tap} \ - `test ${vnc} = "yes" && echo "-s 29,fbuf,tcp=0.0.0.0:5900,wait"` \ + ${vnc:+${vnc}} \ -s 30,xhci,tablet \ -s 31,lpc \ ${com:+-l com1,${com}} \