[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#386441: initramfs-tools: Support custom framebuffer modules



On Wed, 13 Sep 2006, David Härdeman wrote:

> >On Mon, 11 Sep 2006, David Härdeman wrote:
> >>		elif [ "$opt" != "${opt#[[:digit:]]*x[[:digit:]]}"; then
> >>			# Sadly no regexps are available
> >>			# but presumably a modevalue without the "mode=" 
> >>			prefix
> >>			echo -n "mode=$opt "
> >you can use printf as regex replacement,
> >it's both in dash as in ash, see load_modules()
> >from scripts/functions
> 
> Ehm...I might be daft, but how would I use printf to check if a string 
> matches the regexp "^[0-9]+x[0-9]+"?

challenge accepted :)
tested on dash and ash, and swaps also the s/x/=/

process_x_sep_value()
{
	value=$1
	IFS='x'
	opt=$(printf "%.0s%s" ${value})
	if [ -n "${opt}" ]; then
		printf "%s=%s" ${value}
	fi
}

 
> >i'll test it out for the 0.80 release, seems very valuable indeed.
> 
> Cool, let me know how it goes

i'll do,
have some troubles atm integrating latest usplash,
gdm does not seem to come up, but i want those goodies.
poking mjg59

regards
 
-- 
maks



Reply to: