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

posix features: como sabeh-los?



Olah pessoal.

Como faco para distinguir posix de naum-posix features num shell script? O script abaixo (debian/config) foi acusado, por Lintian, de bashista :)

#!/bin/sh -e

. /usr/share/debconf/confmodule
db_version 2.0

if [ "$1" = "configure" ]; then
    if [ ! -c /dev/.devfsd -a ! -c /dev/raw1394 ]; then
	db_input low libraw1394/device_node || true
	db_go
    fi
fi

Segundo a politica, uma solucao eh tornar bash (e naum sh) o seu interpretador.

#!/bin/bash -e
            ^^^^
. /usr/share/debconf/confmodule
db_version 2.0

if [ "$1" = "configure" ]; then
    if [ ! -c /dev/.devfsd -a ! -c /dev/raw1394 ]; then
	db_input low libraw1394/device_node || true
	db_go
    fi
fi

Mas e se eu quisesse manter o script posix compliant? O que, no script, naum eh posix compliant? Como descobrir isto noutros casos?

Desde jah, grato.

--
marciotex



Reply to: