index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | checkpkg.in | 12 |
diff --git a/checkpkg.in b/checkpkg.in index e3d2c16..374c004 100644 --- a/checkpkg.in +++ b/checkpkg.in @@ -35,14 +35,16 @@ usage() { OPTIONS -r, --rmdir Remove the temporary directory + -w, --warn Print a warning in case of differences -h, --help Show this help text _EOF_ } RMDIR=0 +WARN=0 -OPT_SHORT='rh' -OPT_LONG=('rmdir' 'help') +OPT_SHORT='rwh' +OPT_LONG=('rmdir' 'warn' 'help') if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then exit 1 fi @@ -53,6 +55,9 @@ while :; do -r|--rmdir) RMDIR=1 ;; + -w|--warn) + WARN=1 + ;; -h|--help) usage exit 0 @@ -128,7 +133,8 @@ for _pkgname in "${pkgname[@]}"; do find-libprovides "$TEMPDIR/$oldpkg" 2>/dev/null | sort > "$TEMPDIR/libraries-$_pkgname-old" find-libprovides "$pkgfile" 2>/dev/null | sort > "$TEMPDIR/libraries-$_pkgname" if ! diff_output="$(sdiff -s "$TEMPDIR/libraries-$_pkgname-old" "$TEMPDIR/libraries-$_pkgname")"; then - msg "Sonames differ in $_pkgname!" + message="Sonames differ in $_pkgname!" + (( WARN )) && warning "$message" || msg "$message" echo "$diff_output" else msg "No soname differences for %s." "$_pkgname" |