| verzia 1.3, 2002/02/03 19:53:08 |
verzia 1.4, 2002/02/04 00:17:53 |
|
|
| |
|
| # sign_gen.sh |
# sign_gen.sh |
| # |
# |
| # Nepto <nepto@pobox.sk> [14/4/2001] [3/10/2001] [7/11/2001] |
# (c) 2001-2002 Ondrej Jombik <nepto@pobox.sk> |
| # - based on the characters created by Rider <rider@lonestar.sk> |
# - based on the characters created by Rider <rider@lonestar.sk> |
| |
# |
| |
# Updates: [14/4/2001] [3/10/2001] [7/11/2001] |
| |
|
| # Directory of sign scripts (this one and cooperates scripts) |
# Directory of sign scripts (this one and cooperates scripts) |
| SIGN_DIR=~/prog/scripts/sign |
SIGN_DIR="$HOME/prog/scripts/sign" |
| |
|
| # Full path and file name of signature database file. |
# Full path and file name of signature database file. |
| SIGN_DB_FILE=$SIGN_DIR/sign.db |
SIGN_DB_FILE="$SIGN_DIR/sign.db" |
| |
|
| # Signature file separator. This string separate various signatures. It must |
# Signature file separator. This string separate various signatures. It must |
| # be alone on the line without any characters before or after string. |
# be alone on the line without any characters before or after string. |
| Riadok 145 while [ `ps x | sed 's/^ *//' | cut -f1 |
|
| Riadok 147 while [ `ps x | sed 's/^ *//' | cut -f1 |
|
| if (\$count == $sign_id && \$ok == 1) { print; } \ |
if (\$count == $sign_id && \$ok == 1) { print; } \ |
| }" 2>/dev/null > ~/.tmp.s; |
}" 2>/dev/null > ~/.tmp.s; |
| |
|
| # Compose whole database file (without separating tags '--') |
# Compose whole database file (without separating tags) |
| # TODO: only valid signatures should be witten into file |
# TODO: only valid signatures should be witten into file |
| cat $SIGN_DB_FILE \ |
cat $SIGN_DB_FILE \ |
| | egrep -v "^($SIGN_DB_SEPARATOR|$SIGN_DB_SEPARATOR_NOTUSED)$" \ |
| egrep -v "^($SIGN_DB_SEPARATOR|$SIGN_DB_SEPARATOR_NOTUSED)$" \ |
| Riadok 163 while [ `ps x | sed 's/^ *//' | cut -f1 |
|
| Riadok 165 while [ `ps x | sed 's/^ *//' | cut -f1 |
|
| mv -f ~/.tmp.signature ~/.signature; |
mv -f ~/.tmp.signature ~/.signature; |
| |
|
| # Sleeping for a while |
# Sleeping for a while |
| |
# TODO: check child process in loop and abort when it terminates |
| sleep $SIGN_DELAY; |
sleep $SIGN_DELAY; |
| done |
done |
| |
|