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

preinst: ( "configure" && [ -n "$2" ] ) or ( "configure" && [ -z "$2" ] ) ?



  Regarding the following part of a preinst maintainer script:


1)    case "$1" in
2)        configure)
3)        if [ -n "$2" ]; then
4)                mkdir -p dir/subDir
5)                # First time install. Can we autodetect the old settings?
6)                test for the old settings


  Am I right that the comment partially means the programmer assures us that at
this point it is a first time install?
  At the 3rd line there is a test for [ -n "$2" ]. By looking at section 6.5 of policy
I would say that for being assured this is a first time install the correct test
should have been [ -z "$2" ]. Am I right?






Reply to: