mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-26 05:59:43 +02:00
gitsch2ps now by default removes cache.lib (option -c keeps it)
- schhist/gitsch2ps: added option -c to keep cache.lib - schhist/gitsch2ps: remove cache.lib unless -c is set - schhist/gitsch2ps: added missing space in warning when the profile is missing
This commit is contained in:
parent
8be9fe13e2
commit
7b1d3fd4d2
@ -17,6 +17,7 @@ usage()
|
||||
cat <<EOF 1>&2
|
||||
usage: $0 [options] top-dir top-schem [commit] outdir
|
||||
|
||||
-c keep .lib.cache (default: delete it)
|
||||
-k keep the temporary directory and print its name
|
||||
-S sanitize the KiCad profile and the top-level sheet
|
||||
EOF
|
||||
@ -27,8 +28,11 @@ EOF
|
||||
sanitize_profile=true
|
||||
sanitize_schem=true
|
||||
keep=false
|
||||
cache=false
|
||||
while true; do
|
||||
case "$1" in
|
||||
-c) cache=true
|
||||
shift;;
|
||||
-k) keep=true
|
||||
shift;;
|
||||
-S) sanitize_profile=`PATH="$PATH":\`dirname "$0"\` which sanitize-profile`
|
||||
@ -71,6 +75,16 @@ rm -rf "$outdir"
|
||||
git clone -q -s -n "$dir/.git" "$tmp" || exit
|
||||
( cd "$tmp" && git checkout -q "$commit"; ) || exit
|
||||
|
||||
clib=${schem%.sch}.cache.lib
|
||||
if [ -e "$tmp/$clib" ]; then
|
||||
if $cache; then
|
||||
echo "found $clib (keeping it)" 1>&2
|
||||
else
|
||||
echo "removing $clib" 1>&2
|
||||
rm -f "$tmp/$clib"
|
||||
fi
|
||||
fi
|
||||
|
||||
pro=${schem%.sch}.pro
|
||||
|
||||
if [ ! -f "$tmp/$pro" -a ! -f "$tmp/$schem" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user