add dvi optimization

This commit is contained in:
JOLIMAITRE Matthieu 2024-03-08 02:12:02 +01:00
parent 3dd105acff
commit 5337ee2aed
4 changed files with 30 additions and 6 deletions

View file

@ -18,6 +18,21 @@ log "updating environment"
fi
AURS="zerofree"
log "creating package db"
rm -fr /tmp/custom-db
mkdir /tmp/custom-db
for aur in $AURS
do
git clone "https://aur.archlinux.org/$aur.git" "/tmp/custom-db/$aur"
( cd "/tmp/custom-db/$aur" && makepkg; )
mv /tmp/custom-db/$aur/$aur-* /tmp/custom-db/
repo-add /tmp/custom-db/custom.db.tar.gz /tmp/custom-db/$aur-*.pkg.tar.zst
done
log "creating iso"
sudo mkarchiso -v -w $PWD/tmp/wdir -r -o $PWD/output $PWD/profile
rm -f output/install.iso
@ -44,11 +59,12 @@ log "creating VM"
log "running VM with iso"
virtualboxvm --startvm $VM_NAME --dvd $PWD/output/install.iso
VBoxManage storageattach $VM_NAME --storagectl=IDE --port=0 --device=0 --medium=none # removes iso after run
VBoxManage storageattach $VM_NAME --storagectl=IDE --port=1 --device=1 --medium=none # removes iso after run
log "exporting VM"
VBoxManage storageattach $VM_NAME --storagectl=IDE --port=0 --device=0 --medium=none # removes iso after run
VBoxManage storageattach $VM_NAME --storagectl=IDE --port=1 --device=1 --medium=none # removes iso after run
VBoxManage modifyhd $PWD/tmp/drive.vdi -compact
rm -f $PWD/output/epitls.ova
VBoxManage export $VM_NAME --output=$PWD/output/epitls.ova --vsys=0 --vmname=epitls --description="VM pour le développement à EPITA Toulouse."