-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·23 lines (17 loc) · 721 Bytes
/
release.sh
File metadata and controls
executable file
·23 lines (17 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
name="openinput-kicad-library"
lib_files="./symbols ./footprints ./3dmodels ./resources ./metadata.json"
# TODO write metadatas dynamically,
# (pack side and kicad repo side)
# rewrite in python
# Pack
zip -r ./${name}.zip ${lib_files}
# Compute checksum
echo -n '"download_sha256": ' > ./${name}_info.txt
sha256sum ./${name}.zip | sed -E 's/\s(.*)//;t;d' >> ./${name}_info.txt
# Compute download size
echo -n '"download_size": ' >> ./${name}_info.txt
du -csb ./${name}.zip | grep total | sed 's/ *\stotal* *\(.*\)/\1/' >> ./${name}_info.txt
# Compute install size
echo -n '"install_size": ' >> ./${name}_info.txt
du -csb ${lib_files} | grep total | sed 's/ *\stotal* *\(.*\)/\1/' >> ./${name}_info.txt