~ubuntu-branches/ubuntu/vivid/ubuntu-kylin-docs/vivid

« back to all changes in this revision

Viewing changes to ubuntu-kylin-help/C/check_status.sh

  • Committer: Package Import Robot
  • Author(s): Lei Luo
  • Date: 2014-04-10 14:58:12 UTC
  • Revision ID: package-import@ubuntu.com-20140410145812-9mfgq3xleqy0l89f
Tags: 14.04.3

* Add "Replaces" field in debian control file to automatically remove
  ubuntu-docs before installation.
* Merge ubuntu-docs changes.
* Update zh_CN tranlation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
# Produce a summary of the statuses of all of the .page topics
 
4
# (Not done properly, but it's OK for a rough estimate)
 
5
#
 
6
# How to use the status tags:
 
7
# none - no status has been assigned
 
8
# stub - contains little to no real content
 
9
# incomplete - outline of all information, but lacking content
 
10
# draft - all content available, but unpolished
 
11
# outdated - was once complete or nearly complete, but needs to
 
12
#            be revised to reflect changes
 
13
# review - ready to be reviewed by editors
 
14
# candidate - reviewed and awaiting a final approval
 
15
# final - approved and ready for publication or distribution
 
16
#
 
17
# DO NOT TRANSLATE
 
18
 
 
19
PREVIOUS_UBUNTU_VERSIONS=( "4.10" "5.04" "5.10" "6.06" "6.10" "7.04" "7.10" "8.04" "8.10" "9.04" "9.10" "10.04" "10.10" "11.04" "11.10" "12.04" "12.10" "13.04" );
 
20
CURRENT_UBUNTU_VERSION="13.10"
 
21
 
 
22
if [ "x$1" = "x" -o "x$1" = "x--none" ]; then
 
23
    echo " "
 
24
    echo "== NONE =="
 
25
    grep -l "$CURRENT_UBUNTU_VERSION.*status=\"none" *.page
 
26
fi
 
27
if [ "x$1" = "x" -o "x$1" = "x--stub" ]; then
 
28
    echo " "
 
29
    echo "== STUB =="
 
30
    grep -l "$CURRENT_UBUNTU_VERSION.*status=\"stub" *
 
31
fi
 
32
if [ "x$1" = "x" -o "x$1" = "x--incomplete" ]; then
 
33
    echo " "
 
34
    echo "== INCOMPLETE =="
 
35
    grep -l "$CURRENT_UBUNTU_VERSION.*status=\"incomplete" *.page
 
36
fi
 
37
if [ "x$1" = "x" -o "x$1" = "x--draft" ]; then
 
38
    echo " "
 
39
    echo "== DRAFT =="
 
40
    grep -l "$CURRENT_UBUNTU_VERSION.*status=\"draft" *.page
 
41
fi
 
42
if [ "x$1" = "x" -o "x$1" = "x--review" ]; then
 
43
    echo " "
 
44
    echo "== REVIEW =="
 
45
    grep -l "$CURRENT_UBUNTU_VERSION.*status=\"review" *.page
 
46
fi
 
47
if [ "x$1" = "x" -o "x$1" = "x--candidate" ]; then
 
48
    echo " "
 
49
    echo "== CANDIDATE =="
 
50
    grep -l "$CURRENT_UBUNTU_VERSION.*status=\"candidate" *.page
 
51
fi
 
52
if [ "x$1" = "x" -o "x$1" = "x--final" ]; then
 
53
    echo " "
 
54
    echo "== FINAL =="
 
55
    grep -l "$CURRENT_UBUNTU_VERSION.*status=\"final" *.page
 
56
fi
 
57
if [ "x$1" = "x" -o "x$1" = "x--outdated" ]; then
 
58
    echo " "
 
59
    echo "== OUTDATED =="
 
60
    grep -l "$CURRENT_UBUNTU_VERSION.*status=\"outdated" *.page
 
61
fi
 
62
 
 
63
        echo " "
 
64
        echo "== EXTINCT =="
 
65
        for item in "${PREVIOUS_UBUNTU_VERSIONS[@]}"; do grep -l "revision version=\"$item" *.page; done;
 
66
 
 
67
if [ "x$1" = "x" ]; then
 
68
    echo " "
 
69
fi
 
70
if [ "x$1" = "x" -o "x$1" = "x--summary" ]; then
 
71
    echo " "
 
72
    echo "== SUMMARY =="
 
73
    echo "      None: " `grep "$CURRENT_UBUNTU_VERSION.*status=\"none" *.page | wc -l`
 
74
    echo "      Stub: " `grep "$CURRENT_UBUNTU_VERSION.*status=\"stub" * | wc -l`
 
75
    echo "Incomplete: " `grep "$CURRENT_UBUNTU_VERSION.*status=\"incomplete" *.page | wc -l`
 
76
    echo "     Draft: " `grep "$CURRENT_UBUNTU_VERSION.*status=\"draft" *.page | wc -l`
 
77
    echo "    Review: " `grep "$CURRENT_UBUNTU_VERSION.*status=\"review" *.page | wc -l`
 
78
    echo " Candidate: " `grep "$CURRENT_UBUNTU_VERSION.*status=\"candidate" *.page | wc -l`
 
79
    echo "     Final: " `grep "$CURRENT_UBUNTU_VERSION.*status=\"final" *.page | wc -l`
 
80
    echo "  Outdated: " `grep "$CURRENT_UBUNTU_VERSION.*status=\"outdated" *.page | wc -l`
 
81
    echo "   Extinct: " `for item in "${PREVIOUS_UBUNTU_VERSIONS[@]}"; do grep -l "revision version=\"$item" *.page; done | wc -l`
 
82
    fi
 
83
echo " "