~nijaba/ubuntu-maintenance-check/trunk

« back to all changes in this revision

Viewing changes to maintenance-check

  • Committer: Nick Barcet
  • Date: 2009-04-15 09:20:46 UTC
  • Revision ID: nick.barcet@canonical.com-20090415092046-rt8xsrfhlup0y4i4
add --all option to list all packages

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
                    (Defaults to the system release.)
36
36
pkg                 Specify the list of packages to check.
37
37
                    (Defaults to all installed packages.)
 
38
-a, --all      List all maintained packages
38
39
-f, --filter VALUE      possible values are:
39
40
                        n - not officially maintained
40
41
                        u - ubuntu desktop
52
53
verbose=0
53
54
download=""
54
55
filter=""
 
56
allmaint=""
55
57
 
56
 
TEMP=`getopt -o hvdf: --long help,verbose,download,filter:,  -- "$@"`
 
58
TEMP=`getopt -o hvdaf: --long help,verbose,download,all,filter:,  -- "$@"`
57
59
eval set -- "$TEMP"
58
60
 
59
61
while true
83
85
        download=1
84
86
        shift
85
87
    ;;
 
88
    -a|--all)
 
89
        allmaint=1
 
90
        shift
 
91
    ;;
86
92
    --)
87
93
        shift || true
88
94
        break
100
106
            fi
101
107
            wget -q -O - "$url" | sed '1,2d;N;$!P;$!D;$d' | sed 's/|.*$//;s/[ \t]*$//' | sort -u | tee "${XNAME}.${XRELEASE}.$j$XSUFFIX"
102
108
        else
103
 
            echo "${XNAME}.${XRELEASE}.$j$XSUFFIX"
 
109
            cat "${XNAME}.${XRELEASE}.$j$XSUFFIX"
104
110
        fi
105
111
    done
106
112
}
186
192
}
187
193
 
188
194
summarize() {
189
 
    FILE="$release.installed"
 
195
    if [ -n "$allmaint" ]; then
 
196
        FILE="$CACHEDIR/$1.supported.pkgs"
 
197
    else
 
198
        FILE="$release.installed"
 
199
    fi
 
200
 
190
201
    echo -e "---\nPackage\tSupport" | expand -t $MYCOLUMNS
191
202
 
192
203
    exec 10<$FILE
413
424
    mv "$release".*.pkgs "$CACHEDIR/"
414
425
    touch "$CACHEDIR/.$release"
415
426
fi
416
 
parseinstalled $release "$@" > $release.installed
 
427
if [ ! -n "$allmaint" ] ; then
 
428
    parseinstalled $release "$@" > $release.installed
 
429
fi
417
430
summarize $release
418
431
 
419
432
popd &> /dev/null