gcc484ntopperl-5.22
|
Last change
on this file since 8f290a0 was
c5c522c,
checked in by Edwin Eefting <edwin@datux.nl>, 9 years ago
|
|
initial commit, transferred from cleaned syn3 svn tree
|
-
Property mode set to
100755
|
|
File size:
1.3 KB
|
| Rev | Line | |
|---|
| [c5c522c] | 1 | #!/bin/bash |
|---|
| 2 | |
|---|
| 3 | NAME=$1 |
|---|
| 4 | shift |
|---|
| 5 | for PAR in $*; do eval "$PAR=1" &>/dev/null; done |
|---|
| 6 | |
|---|
| 7 | if [ "$NAME" == "" ]; then |
|---|
| 8 | echo "Usage: $0 <packagename> [info] [confirm]" |
|---|
| 9 | echo " Checks if the package is still up to date with upstream versions. Uses the .check file to do this" |
|---|
| 10 | echo " Add 'info' for more info." |
|---|
| 11 | echo " Add 'confirm' to confirm changes." |
|---|
| 12 | exit 1 |
|---|
| 13 | fi |
|---|
| 14 | |
|---|
| 15 | CHECK=`./findbuild $NAME`.check || exit 1 |
|---|
| 16 | OK="$CHECK.ok" |
|---|
| 17 | CURRENT=/tmp/$$.check.current |
|---|
| 18 | |
|---|
| 19 | if ! [ -e "$CHECK" ]; then |
|---|
| 20 | echo "(not checking version of $0, no .check file found)" |
|---|
| 21 | exit 0 |
|---|
| 22 | fi |
|---|
| 23 | |
|---|
| 24 | trap "rm $CURRENT" 0 |
|---|
| 25 | |
|---|
| 26 | echo -n "Running $CHECK..." |
|---|
| 27 | chmod +X $CHECK || exit 1 |
|---|
| 28 | if ! $CHECK > $CURRENT; then |
|---|
| 29 | echo "ERROR: Check script returned error code, please verify the script and urls!" |
|---|
| 30 | exit 1 |
|---|
| 31 | fi |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | if [ "$info" ]; then |
|---|
| 35 | echo "Output:" |
|---|
| 36 | cat "$CURRENT" |
|---|
| 37 | if [ -e "$OK" ]; then |
|---|
| 38 | echo "Difference with previous check:" |
|---|
| 39 | diff "$OK" "$CURRENT" |
|---|
| 40 | else |
|---|
| 41 | echo "(No previous check data is avaiable yet)" |
|---|
| 42 | fi |
|---|
| 43 | fi |
|---|
| 44 | |
|---|
| 45 | if ! cmp "$OK" "$CURRENT" &>/dev/null; then |
|---|
| 46 | if [ "$confirm" ]; then |
|---|
| 47 | echo -n "confirming changes..." |
|---|
| 48 | cp $CURRENT $OK || exit 1 |
|---|
| 49 | echo "OK" |
|---|
| 50 | else |
|---|
| 51 | echo -e "\e[1;31m*** Warning, upstream version changed! Run '$0 $NAME info' for more info.\e[0m" |
|---|
| 52 | exit 1 |
|---|
| 53 | fi |
|---|
| 54 | else |
|---|
| 55 | echo "OK" |
|---|
| 56 | fi |
|---|
| 57 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.