equal
deleted
inserted
replaced
1 #! /bin/sh |
1 #! /bin/sh |
2 # |
2 # |
3 # automaticly update logbuch |
3 # automaticly update logbuch |
4 # if using apt-get or aptitude command |
4 # if using apt-get or aptitude command |
5 # |
5 # |
6 # (C) 2011 by Christian Arnold - Schlittermann internet & unix support |
6 # (C) 2012 by Christian Arnold - Schlittermann internet & unix support |
7 |
7 |
8 set -e |
8 set -e |
9 |
9 |
10 unset LC_ALL |
10 unset LC_ALL |
11 export LANG=C |
11 export LANG=C |
28 echo "$0: $LINES_COUNT is empty" >&2 |
28 echo "$0: $LINES_COUNT is empty" >&2 |
29 exit 0 |
29 exit 0 |
30 fi |
30 fi |
31 |
31 |
32 APT_CMD=$(ps -p $1 -o args=) |
32 APT_CMD=$(ps -p $1 -o args=) |
|
33 |
|
34 # skip download-only from logbuch |
|
35 if echo $APT_CMD | grep -q "[[:space:]]\+-d\|-dy\|-yd"; then |
|
36 exit 0 |
|
37 elif echo $APT_CMD | grep -q "[[:space:]]\+--download-only"; then |
|
38 exit 0 |
|
39 fi |
|
40 |
33 APT_TMP="/tmp/$$.tmp" |
41 APT_TMP="/tmp/$$.tmp" |
34 APT_OUT="/tmp/$$.out" |
42 APT_OUT="/tmp/$$.out" |
35 |
43 |
36 if [ $APT_LOG -nt $LINES_COUNT ]; then |
44 if [ $APT_LOG -nt $LINES_COUNT ]; then |
37 BEFOR=$(cat $LINES_COUNT) |
45 BEFOR=$(cat $LINES_COUNT) |