Skip to content
Snippets Groups Projects
Commit be788310 authored by Taras Lazariv's avatar Taras Lazariv
Browse files

Add script for checking filesize

parent 610a68c3
No related branches found
No related tags found
3 merge requests!446docs: Add Jupyter Teaching Example,!428Automated merge from preview to main,!427Add script for checking filesize
#!/bin/bash
# Credits to https://gitlab.com/NERSC/nersc.gitlab.io/
large_files_present=false
for f in $(git diff main --name-only); do
fs=$(wc -c $f | awk '{print $1}')
if [ $fs -gt 1048576 ]; then
echo $f 'is over 1M ('$fs' bytes)'
large_files_present=true
fi
done
if [ "$large_files_present" == true ]; then
exit 1
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment