Update scripts from upstream
This commit is contained in:
parent
504f7f3476
commit
00bfd84e64
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#$Id$
|
#$Id$
|
||||||
#Copyright (c) 2011-2015 Pierre Pronchery <khorben@defora.org>
|
#Copyright (c) 2011-2017 Pierre Pronchery <khorben@defora.org>
|
||||||
#
|
#
|
||||||
#Redistribution and use in source and binary forms, with or without
|
#Redistribution and use in source and binary forms, with or without
|
||||||
#modification, are permitted provided that the following conditions are met:
|
#modification, are permitted provided that the following conditions are met:
|
||||||
|
@ -66,7 +66,7 @@ _usage()
|
||||||
clean=0
|
clean=0
|
||||||
install=0
|
install=0
|
||||||
uninstall=0
|
uninstall=0
|
||||||
while getopts "ciuP:" name; do
|
while getopts "ciuO:P:" name; do
|
||||||
case $name in
|
case $name in
|
||||||
c)
|
c)
|
||||||
clean=1
|
clean=1
|
||||||
|
@ -79,6 +79,9 @@ while getopts "ciuP:" name; do
|
||||||
install=0
|
install=0
|
||||||
uninstall=1
|
uninstall=1
|
||||||
;;
|
;;
|
||||||
|
O)
|
||||||
|
export "${OPTARG%%=*}"="${OPTARG#*=}"
|
||||||
|
;;
|
||||||
P)
|
P)
|
||||||
PREFIX="$OPTARG"
|
PREFIX="$OPTARG"
|
||||||
;;
|
;;
|
||||||
|
@ -89,7 +92,7 @@ while getopts "ciuP:" name; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $(($OPTIND - 1))
|
shift $(($OPTIND - 1))
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -lt 0 ]; then
|
||||||
_usage
|
_usage
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
@ -148,6 +151,7 @@ while [ $# -gt 0 ]; do
|
||||||
#create
|
#create
|
||||||
source="${target#$OBJDIR}"
|
source="${target#$OBJDIR}"
|
||||||
source="${source}.in"
|
source="${source}.in"
|
||||||
|
([ -z "$OBJDIR" ] || $DEBUG $MKDIR -- "${target%/*}") || exit 2
|
||||||
$DEBUG $SED -e "s;@PACKAGE@;$PACKAGE;" \
|
$DEBUG $SED -e "s;@PACKAGE@;$PACKAGE;" \
|
||||||
-e "s;@VERSION@;$VERSION;" \
|
-e "s;@VERSION@;$VERSION;" \
|
||||||
-e "s;@PREFIX@;$PREFIX;" \
|
-e "s;@PREFIX@;$PREFIX;" \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#$Id$
|
#$Id$
|
||||||
#Copyright (c) 2012-2015 Pierre Pronchery <khorben@defora.org>
|
#Copyright (c) 2012-2017 Pierre Pronchery <khorben@defora.org>
|
||||||
#
|
#
|
||||||
#Redistribution and use in source and binary forms, with or without
|
#Redistribution and use in source and binary forms, with or without
|
||||||
#modification, are permitted provided that the following conditions are met:
|
#modification, are permitted provided that the following conditions are met:
|
||||||
|
@ -72,7 +72,7 @@ _usage()
|
||||||
clean=0
|
clean=0
|
||||||
install=0
|
install=0
|
||||||
uninstall=0
|
uninstall=0
|
||||||
while getopts "ciuP:" name; do
|
while getopts "ciO:uP:" name; do
|
||||||
case "$name" in
|
case "$name" in
|
||||||
c)
|
c)
|
||||||
clean=1
|
clean=1
|
||||||
|
@ -81,6 +81,9 @@ while getopts "ciuP:" name; do
|
||||||
uninstall=0
|
uninstall=0
|
||||||
install=1
|
install=1
|
||||||
;;
|
;;
|
||||||
|
O)
|
||||||
|
export "${OPTARG%%=*}"="${OPTARG#*=}"
|
||||||
|
;;
|
||||||
u)
|
u)
|
||||||
install=0
|
install=0
|
||||||
uninstall=1
|
uninstall=1
|
||||||
|
@ -95,7 +98,7 @@ while getopts "ciuP:" name; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $((OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
_usage
|
_usage
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#$Id$
|
#$Id$
|
||||||
#Copyright (c) 2014-2016 Pierre Pronchery <khorben@defora.org>
|
#Copyright (c) 2014-2017 Pierre Pronchery <khorben@defora.org>
|
||||||
#
|
#
|
||||||
#Redistribution and use in source and binary forms, with or without
|
#Redistribution and use in source and binary forms, with or without
|
||||||
#modification, are permitted provided that the following conditions are met:
|
#modification, are permitted provided that the following conditions are met:
|
||||||
|
@ -32,7 +32,7 @@ DATE="date"
|
||||||
DEBUG="_debug"
|
DEBUG="_debug"
|
||||||
FIND="find"
|
FIND="find"
|
||||||
PYLINT="pep8"
|
PYLINT="pep8"
|
||||||
SORT="sort"
|
SORT="sort -n"
|
||||||
TR="tr"
|
TR="tr"
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,7 +43,6 @@ _pylint()
|
||||||
subdirs="data doc src tests tools"
|
subdirs="data doc src tests tools"
|
||||||
|
|
||||||
$DATE
|
$DATE
|
||||||
echo
|
|
||||||
while read line; do
|
while read line; do
|
||||||
case "$line" in
|
case "$line" in
|
||||||
"["*)
|
"["*)
|
||||||
|
@ -58,9 +57,11 @@ _pylint()
|
||||||
for subdir in $subdirs; do
|
for subdir in $subdirs; do
|
||||||
[ -d "../$subdir" ] || continue
|
[ -d "../$subdir" ] || continue
|
||||||
for filename in $($FIND "../$subdir" -name '*.py' | $SORT); do
|
for filename in $($FIND "../$subdir" -name '*.py' | $SORT); do
|
||||||
|
echo
|
||||||
|
echo "Testing: $filename"
|
||||||
$DEBUG $PYLINT -- "$filename" 2>&1
|
$DEBUG $PYLINT -- "$filename" 2>&1
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "$filename:"
|
echo "$PROGNAME: $filename: OK" 1>&2
|
||||||
else
|
else
|
||||||
#XXX ignore errors
|
#XXX ignore errors
|
||||||
echo "$PROGNAME: $filename: FAIL" 1>&2
|
echo "$PROGNAME: $filename: FAIL" 1>&2
|
||||||
|
@ -85,18 +86,21 @@ _debug()
|
||||||
#usage
|
#usage
|
||||||
_usage()
|
_usage()
|
||||||
{
|
{
|
||||||
echo "Usage: $PROGNAME [-c] target" 1>&2
|
echo "Usage: $PROGNAME [-c] target..." 1>&2
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#main
|
#main
|
||||||
clean=0
|
clean=0
|
||||||
while getopts "cP:" name; do
|
while getopts "cO:P:" name; do
|
||||||
case "$name" in
|
case "$name" in
|
||||||
c)
|
c)
|
||||||
clean=1
|
clean=1
|
||||||
;;
|
;;
|
||||||
|
O)
|
||||||
|
export "${OPTARG%%=*}"="${OPTARG#*=}"
|
||||||
|
;;
|
||||||
P)
|
P)
|
||||||
#XXX ignored for compatibility
|
#XXX ignored for compatibility
|
||||||
;;
|
;;
|
||||||
|
@ -107,14 +111,18 @@ while getopts "cP:" name; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $((OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
if [ $# -ne 1 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
_usage
|
_usage
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
target="$1"
|
|
||||||
|
|
||||||
#clean
|
#clean
|
||||||
[ $clean -ne 0 ] && exit 0
|
[ $clean -ne 0 ] && exit 0
|
||||||
|
|
||||||
exec 3>&1
|
exec 3>&1
|
||||||
_pylint > "$target"
|
while [ $# -gt 0 ]; do
|
||||||
|
target="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
_pylint > "$target" || exit 2
|
||||||
|
done
|
||||||
|
|
Loading…
Reference in New Issue
Block a user