mirror of
https://github.com/mfocko/blog.git
synced 2024-11-13 01:30:29 +01:00
Matej Focko
9f9dc39a31
• Do not keep the SVG files in the repository, generate them just for the builds • Also generate ZIP files with sources for downloading Signed-off-by: Matej Focko <mfocko@redhat.com>
18 lines
No EOL
425 B
Bash
18 lines
No EOL
425 B
Bash
#!/bin/bash
|
|
|
|
# remove preexisting ZIPs
|
|
find ./static/files -name '*.zip' -exec rm {} \;
|
|
|
|
for relative_path in $(find ./static/files -name '.zipit' -print); do
|
|
relative_path=$(dirname $relative_path)
|
|
base=$(basename $relative_path)
|
|
pushd $relative_path/..
|
|
|
|
echo "PWD: $PWD"
|
|
|
|
all_files=$(find $base/** ! -name '.zipit' -print)
|
|
zip -9 $base.zip $all_files
|
|
mv $base.zip $base/$base.zip
|
|
|
|
popd
|
|
done; |