trisquel-netinstall: move scripts inside the Makefile
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
This commit is contained in:
parent
af2419d575
commit
0a02454402
|
@ -13,7 +13,7 @@ VERSION ?= 11.0
|
|||
trisquel-netinst_$(VERSION)_amd64.iso \
|
||||
trisquel-netinst_$(VERSION)_amd64.iso.asc
|
||||
|
||||
.PHONY: all
|
||||
.PHONY: all install-vm
|
||||
all: verify-trisquel-netinst_$(VERSION)_amd64
|
||||
|
||||
trisquel-archive-signkey.gpg:
|
||||
|
@ -30,3 +30,50 @@ trisquel-archive-signkey.gpg:
|
|||
|
||||
verify-%: %.iso.asc
|
||||
gpg --verify $<
|
||||
|
||||
install-iso:
|
||||
virsh -c qemu:///system vol-list installation | \
|
||||
tail +3 | \
|
||||
awk '{print $1}' | \
|
||||
grep '^trisquel-netinst_11.0_amd64.iso$' || \
|
||||
( \
|
||||
virsh -c qemu:///system \
|
||||
vol-create-as \
|
||||
installation trisquel-netinst_11.0_amd64.iso 0 && \
|
||||
virsh -c qemu:///system \
|
||||
vol-upload \
|
||||
--pool installation trisquel-netinst_11.0_amd64.iso \
|
||||
--file $PWD/trisquel-netinst_11.0_amd64.iso \
|
||||
)
|
||||
|
||||
# We need that for transparency reasons
|
||||
install-signature:
|
||||
virsh -c qemu:///system vol-list installation | \
|
||||
tail +3 | \
|
||||
awk '{print $1}' | \
|
||||
grep '^trisquel-netinst_11.0_amd64.iso.asc$' || \
|
||||
( \
|
||||
virsh -c qemu:///system \
|
||||
vol-create-as \
|
||||
installation trisquel-netinst_11.0_amd64.iso.asc 0 && \
|
||||
virsh -c qemu:///system \
|
||||
vol-upload \
|
||||
--pool installation trisquel-netinst_11.0_amd64.iso \
|
||||
--file $PWD/trisquel-netinst_11.0_amd64.iso.asc \
|
||||
)
|
||||
|
||||
VM_DEPENDENCIES = \
|
||||
install-iso \
|
||||
install-signature \
|
||||
verify-trisquel-netinst_$(VERSION)_amd64
|
||||
|
||||
install-vm: $(VM_DEPENDENCIES)
|
||||
if ! virsh -c qemu:///system \
|
||||
desc experimental-trisquel-netinstall ; then \
|
||||
virsh -c qemu:///system destroy \
|
||||
experimental-trisquel-netinstall || true ; \
|
||||
virsh -c qemu:///system undefine \
|
||||
experimental-trisquel-netinstall ; \
|
||||
fi
|
||||
virsh -c qemu:///system \
|
||||
define --file experimental-trisquel-netinstall.xml
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
||||
#
|
||||
# This project is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This project is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this project. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
virsh -c qemu:///system \
|
||||
vol-create-as installation trisquel-netinst_11.0_amd64.isoc 0
|
||||
|
||||
virsh -c qemu:///system \
|
||||
vol-upload --pool installation trisquel-netinst_11.0_amd64.iso \
|
||||
--file $PWD/trisquel-netinst_11.0_amd64.iso
|
||||
|
||||
virsh -c qemu:///system \
|
||||
vol-create-as installation trisquel-netinst_11.0_amd64.iso.asc 0
|
||||
|
||||
virsh -c qemu:///system \
|
||||
vol-upload --pool installation trisquel-netinst_11.0_amd64.iso.asc \
|
||||
--file $PWD/trisquel-netinst_11.0_amd64.iso.asc
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
||||
#
|
||||
# This project is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This project is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this project. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
virsh -c qemu:///system define --file experimental-trisquel-netinstall.xml
|
Loading…
Reference in New Issue