Add a script to build and install FreeBSD.
This commit is contained in:
parent
7861102ef9
commit
f23af58936
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Build and install FreeBSD
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
function main {
|
||||
local existing_packages
|
||||
cd /bridge/git/freebsd_amp_hwpstate
|
||||
|
||||
doas git config --global --add safe.directory /bridge/git/freebsd_amp_hwpstate
|
||||
|
||||
mymake buildworld buildkernel
|
||||
mymake packages
|
||||
|
||||
existing_packages=$(doas pkg info -g 'FreeBSD-*' | sed -E 's/\.snap.*//g')
|
||||
while read p; do
|
||||
echo /usr/obj/bridge/git/freebsd_amp_hwpstate/repo/FreeBSD:15:amd64/15.snap*/"$p".snap*.pkg
|
||||
done <<<"$existing_packages" | xargs echo doas pkg install --yes
|
||||
}
|
||||
|
||||
function mymake {
|
||||
# REPODIR=/tmp/repo
|
||||
doas make SRCCONF=/bridge/git/machine_setup/ansible/roles/poudriere/files/currentznver4_src.conf __MAKE_CONF=/bridge/git/machine_setup/ansible/roles/poudriere/files/poudriere.d/currentznver4-default-framework-make.conf KERNCONF=GENERIC-NODEBUG -j "$(sysctl -n hw.ncpu)" "${@}"
|
||||
|
||||
}
|
||||
|
||||
main "${@}"
|
Loading…
Reference in New Issue