Skip to content

Commit

Permalink
ignore_module file ignores module paths in init/deinit/update
Browse files Browse the repository at this point in the history
  • Loading branch information
tuna-f1sh committed Jan 25, 2023
1 parent 4d03223 commit c9b297d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignore_modules
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ This downloads all the libraries in parallel but it can still take a while.

If you are stuck on KiCad version 4 or version 5 can use the `kicad-4` or the `kicad-5` branch. These branches are not being updated though.

#### Ignoring Modules

Create a file 'ignore_modules'. Add regexp patterns per line for module names to ignore. If doing this having already run './init', create the ignore file, then run './deinit'

### Updating

If you want to update all libraries to their latest versions do:
Expand All @@ -48,7 +52,6 @@ _Warning: This will overwrite your existing fp-lib-table, discard any customizat
cp ~/.config/kicad/6.0/fp-lib-table ~/.config/kicad/6.0/fp-lib-table.backup
./generate_table ~/.config/kicad/6.0/fp-lib-table


#### Mac OS

cp ~/Library/Preferences/kicad/6.0/fp-lib-table ~/Library/Preferences/kicad/6.0/fp-lib-table.backup
Expand All @@ -75,7 +78,6 @@ If you don't like the new way of organizing footprint libs and want to restore y

cp ~/AppData/Roaming/kicad/6.0/fp-lib-table.backup ~/AppData/Roaming/kicad/6.0/fp-lib-table


### 3D models

You can try and hack the 3D models to be correctly associated to the footprints through absolute paths by running this script:
Expand Down
12 changes: 12 additions & 0 deletions deinit
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env sh
set -eu

max_parallel_tasks=10
ignore_file='ignore_modules'
test -f $ignore_file || touch $ignore_file

#prevents git from waiting for password input on invalid/removed git URLs
export GIT_ASKPASS=/bin/echo

git submodule | awk '{ print $2 }' | grep --file=$ignore_file \
| xargs -I'{}' -P$max_parallel_tasks git submodule deinit -f '{}'
4 changes: 3 additions & 1 deletion init
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
set -eu

max_parallel_tasks=10
ignore_file='ignore_modules'
test -f $ignore_file || touch $ignore_file

#prevents git from waiting for password input on invalid/removed git URLs
export GIT_ASKPASS=/bin/echo

git submodule init

git submodule | awk '{ print $2 }' \
git submodule | awk '{ print $2 }' | grep --invert-match --file=$ignore_file \
| xargs -I'{}' -P$max_parallel_tasks sh clone.sh '{}'
4 changes: 3 additions & 1 deletion update
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
set -eu

max_parallel_tasks=10
ignore_file='ignore_modules'
test -f $ignore_file || touch $ignore_file

#prevents git from waiting for password input on invalid/removed git URLs
export GIT_ASKPASS=/bin/echo

git submodule | awk '{ print $2 }' \
git submodule | awk '{ print $2 }' | grep --invert-match --file=$ignore_file \
| xargs -I'{}' -P$max_parallel_tasks sh check.sh {}

0 comments on commit c9b297d

Please sign in to comment.