mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-22 20:44:05 +02:00
Minor code cleanup and robustness improvement.
- scripts/gitsch2ppm, scripts/schhist2web: replace awkward and cryptic `dirname "$x"`/`basename "$x" .old`.new construct with much more friendly "${x%.old}.new" - scripts/gitenealogy: put -- before path names in git-log, to prevent parsing ambiguities
This commit is contained in:
parent
b3728b5c54
commit
3ca646cd57
@ -37,7 +37,7 @@ if [ ! -f "$1/$2" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$1" || exit
|
cd "$1" || exit
|
||||||
git log --follow --name-status "$2" |
|
git log --follow --name-status -- "$2" |
|
||||||
awk '
|
awk '
|
||||||
/^commit /{ if (c) print c, n; c = $2 }
|
/^commit /{ if (c) print c, n; c = $2 }
|
||||||
{ if (NF) n = $(NF) }
|
{ if (NF) n = $(NF) }
|
||||||
|
@ -32,7 +32,7 @@ EOF
|
|||||||
gs -sDEVICE=ppmraw -sOutputFile=- -g$IRES -r$res \
|
gs -sDEVICE=ppmraw -sOutputFile=- -g$IRES -r$res \
|
||||||
-dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q - |
|
-dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q - |
|
||||||
pnmflip -r270 |
|
pnmflip -r270 |
|
||||||
cat >`dirname "$1"`/`basename "$1" .ps`.ppm
|
cat >"${1%.ps}.ppm"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ if ! $cache; then
|
|||||||
(
|
(
|
||||||
cd "$sch" || exit
|
cd "$sch" || exit
|
||||||
rm -f *.ps *.ppm
|
rm -f *.ps *.ppm
|
||||||
$sanitize "$tmp"/`dirname "$schem"`/`basename "$schem" .sch`.pro ||
|
$sanitize "$tmp/${schem%.sch}.pro" ||
|
||||||
exit
|
exit
|
||||||
eeschema --plot "$tmp/$schem"
|
eeschema --plot "$tmp/$schem"
|
||||||
) || exit
|
) || exit
|
||||||
|
@ -89,12 +89,12 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z "$1" -a -f "$dir/$1" -a \
|
if [ ! -z "$1" -a -f "$dir/$1" -a \
|
||||||
-f "$dir"/`dirname "$1"`/`basename "$1" .sch`.pro ]; then
|
-f "$dir/${1%.sch}.pro" ]; then
|
||||||
sch="$1"
|
sch="$1"
|
||||||
shift
|
shift
|
||||||
else
|
else
|
||||||
for n in "$dir"/*.sch; do
|
for n in "$dir"/*.sch; do
|
||||||
[ -f `dirname "$n"`/`basename "$n" .sch`.pro ] || continue
|
[ -f "${n%.sch}.pro" ] || continue
|
||||||
if [ ! -z "$sch" ]; then
|
if [ ! -z "$sch" ]; then
|
||||||
echo "multiple choices for top-level .sch file" 1>&2
|
echo "multiple choices for top-level .sch file" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user