3 # Inventory -- take an inventory of the lsof distribution's 00MANIFEST
5 # Establish trap and stty handling.
8 trap '$ISIG; exit 1' 1 2 3 15
9 stty -a 2>&1 | grep isig > /dev/null
12 stty -a 2>&1 | egrep -e -isig > /dev/null
20 # Establish echo type -- Berkeley or SYSV.
23 if test "X$j" = "X-n "
32 # Display the introduction and basic explanation.
36 This configuration step (the Inventory script) takes inventory of
37 the lsof distribution. The script runs for a minute or two while
38 it checks that all the subdirectories, information files, scripts,
39 header files and source files that should be present really are.
41 It's not absolutely necessary that you take inventory, but it's a
42 good idea to do it right after the lsof distribution has been
43 unpacked. Once the inventory has been taken, this script creates
44 the file ./.ck00MAN as a signal that the inventory step has been
47 You can call the Inventory script directly at any time to take
48 inventory. You can inhibit the inventory step permanently by
49 creating the file ./.neverInv, and you can tell the Configure script
50 to skip the inventory and customization steps with the -n option.
57 echo $EO "Do you want to take inventory (y|n) [y]? $EC"
59 if test "X$ANS" = "Xn" -o "X$ANS" = "XN"
63 if test "X$ANS" = "Xy" -o "X$ANS" = "XY" -o "X$ANS" = "X"
68 echo "Please answer y or n."
72 # The current directory is assumed to be the lsof distribution home.
76 # If .ck00MAN exists, the manifest has already been checked.
77 # See if the caller wants to check it again.
84 ======================================================================
86 The lsof distribution inventory in 00MANIFEST has already been checked.
93 echo $EO "Do you want to check the inventory again (y|n) [n]? $EC"
95 if test "X$ANS" = "Xn" -o "X$ANS" = "XN" -o "X$ANS" = "X"
99 if test "X$ANS" = "Xy" -o "X$ANS" = "XY"
104 echo "Please answer y or n."
111 # See if manifest exists. Exit if it does not.
113 if test ! -r 00MANIFEST
115 echo "FATAL: 00MANIFEST file not found or not readable; Inventory exits."
120 # Start the inventory.
123 echo "Conducting an inventory of the lsof distribution; this will take a while."
125 echo $EO "Examining ${D}:$EC"
128 for i in `cat 00MANIFEST | sed 's/\*$//'`
132 j=`expr $i : '\(.*\)/$'`
133 if test "X$j" != "X" -a "X$j" != "X0"
136 # Check a subdirectory reference.
138 if test ! -d ${D}/${S}/$j
144 echo " Subdirectory ${S}/$j is missing. ++++"
149 s=`expr $i : '\(.*\):$'`
150 if test "X$s" != "X" -a "X$s" != "X0"
153 # Process a subdirectory change.
161 echo $EO "Examining $S:$EC"
165 echo " Subdirectory $S is missing. ++++"
171 # Process a file reference.
173 if test ! -r ${D}/${S}/$i
179 echo " File ${S}/$i is missing. ++++"
194 echo "+++++++++++++++++++++++++++++++++++++++++++++++"
196 echo "+ SOME FILES OR DIRECTORIES MAY BE MISSING! +"
198 echo "+++++++++++++++++++++++++++++++++++++++++++++++"
200 echo "This lsof distribution seems to be complete."