36 if ([ $PRINT_INPUTS = 0 ] && [ "$#" -ne 1 ]) ||
37 ([ $PRINT_INPUTS = 1 ] && [ "$#" -ne 0 ]) ||
40 echo "Usage: $0 [options ... ] <output-file>"
42 echo "This script will collect the copious information needed to"
43 echo "reproduce an aptitude bug, storing it in the given output file."
46 echo " --force-bzip2 Override autodetection of the comrpession"
47 echo " format: use bzip2 even if it appears to be"
49 echo " --force-gzip Override autodetection of the compression"
50 echo " format: use gzip even if bzip2 is available."
51 echo " --help Print this message, then exit."
52 echo " --print-inputs Display the list of files and directories"
53 echo " that would be included in the bundle, then exit."
58 INPUTS[1]="$HOME/.aptitude"
59 INPUTS[2]="/var/lib/aptitude"
60 INPUTS[3]="/var/lib/apt"
61 INPUTS[4]="/var/cache/apt/*.bin"
63 INPUTS[6]="/var/lib/dpkg/status"
65 if [ $PRINT_INPUTS = 1 ]
67 for x in ${INPUTS[@]}; do echo $x; done
71 # Stick "." on the front of all inputs.
74 while [ $i -le ${#INPUTS[*]} ]
76 REALINPUTS[$i]=./${INPUTS[$i]}
82 if [ $FORCE_BZIP2 = 1 ] || ([ $FORCE_GZIP = 0 ] && which bzip2 2> /dev/null > /dev/null)
89 (cd / && tar c ${REALINPUTS[@]}) | $COMPRESSOR -c > "$OUTFILE"