Closed inuyasha82 closed 5 months ago
It depends on the location of DreamOs folder, it can be anywhere so relative paths cannot be used in universal way. Maybe, do you mean using some script variable?
Emily it is obvious that depend on the location of Dreamos (and anyway it depens mainly on the location of bochs), my idea is to add in the readme a suggested path for bochs and dreamos and use a relative path to that default location, or maybe when you launch start.sh it will set an Environment variable with Bochs location, or look for it programmatically, I still have to decide.
We could redistribute vgaromimage and romimage bochs in dreamos folder?
I don't think is a good idea. I don't want to add binary files to the repository if not really necessary (and in this case this is not necessary)
Ok
If we want to use "locate" command, i made a small script that could be integrated in start.sh.
sh sample
#!/bin/sh
SEARCH=$(locate BIOS-bochs-latest)
OLD_IFS=$IFS # save internal field separator
IFS='
' # set it to newline
set -- $SEARCH # make the result positional parameters
IFS=$OLD_IFS # restore IFS
ROMIMAGE=$1
SEARCH=$(locate VGABIOS-lgpl-latest)
OLD_IFS=$IFS # save internal field separator
IFS='
' # set it to newline
set -- $SEARCH # make the result positional parameters
IFS=$OLD_IFS # restore IFS
VGAROMIMAGE=$1
echo $ROMIMAGE
echo $VGAROMIMAGE
Bash sample
#!/bin/bash
SEARCH=$(locate BIOS-bochs-latest)
IFS=$'\n' read -ra OUTPUT <<< "$SEARCH"
ROMIMAGE="${OUTPUT[0]}"
SEARCH=$(locate VGABIOS-lgpl-latest)
IFS=$'\n' read -ra OUTPUT <<< "$SEARCH"
VGAROMIMAGE="${OUTPUT[0]}"
echo $ROMIMAGE
echo $VGAROMIMAGE
ROMIMAGE and VGAROMIMAGE has got the first entry containing files we need. This solution needs 'updatedb' to be issued, to be sure that index db is updated.
i.e. vgaromimage romimage