SeismicX-Cont / scripts /write_manifest.sh
cangyeone's picture
Upload scripts/write_manifest.sh
681a86d verified
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
(
cd "$ROOT"
find . -type f \
! -path './.git/*' \
! -path './.cache/*' \
! -path './__pycache__/*' \
! -path './*/__pycache__/*' \
! -path './.pytest_cache/*' \
! -path './.ipynb_checkpoints/*' \
! -path './*/.ipynb_checkpoints/*' \
! -path './data/hdf5_hour_subsets/*' \
! -path './data/picks/*' \
! -path './eval_picks/*' \
! -path './figures/*' \
! -path './essd/*' \
! -path './publish_mini/*' \
! -path './temp/*' \
! -path './SeismicX-Cont-mini.zip' \
! -path './pickers/seismicxm.01.jit' \
! -path './upload_4files_to_ms.py' \
! -name 'manifest_sha256.txt' \
! -name '._*' \
! -path './*/._*' \
! -name '.DS_Store' \
! -path './*/.DS_Store' \
| LC_ALL=C sort \
| while read -r path; do
shasum -a 256 "$path"
done
) > "$ROOT/manifest_sha256.txt"
echo "[OK] wrote $ROOT/manifest_sha256.txt"