Ignore:
Timestamp:
Dec 29, 2021, 5:52:03 PM (2 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/crepe
Children:
be3164d
Parents:
1c2ccea
git-author:
Paul Brossier <piem@piem.org> (12/26/21 23:27:21)
git-committer:
Paul Brossier <piem@piem.org> (12/29/21 17:52:03)
Message:

[scripts] accomodate get_crepe.sh for macos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/get_crepe.sh

    r1c2ccea rcba2b12  
    11#! /bin/bash
    22
    3 CREPEURL=https://github.com/marl/crepe/blob/models/model-tiny.h5.bz2?raw=true
     3CREPEURL="https://github.com/marl/crepe/blob/models/model-tiny.h5.bz2?raw=true"
    44MODELTARGET=crepe-model-tiny.h5
    55SHA512=91df10316092de0d9c35ae0eaa8f6cceb49fb01f54dc74f9f1196f7f569a3f885242d1abded56c9825180552a602d9e76f2021d7cfb55cfbefb2f84c8a9f4715
     
    77
    88function checkmodelsum () {
    9   (echo $SHA512  $MODELTARGET | sha512sum -c - ) || (echo $MODELTARGET checksum did not match?!; exit 1)
     9  ( echo "$SHA512  $MODELTARGET" | shasum -a 512 -c - ) || (echo $MODELTARGET checksum did not match?!; exit 1)
     10}
     11
     12function downloadmodel () {
     13  if command -v wget &> /dev/null
     14  then
     15    wget -qO- $1
     16  else
     17    curl -Lso- $1
     18  fi
    1019}
    1120
    1221function fetchmodel () {
    13   wget -qO- $CREPEURL | bunzip2 - > $MODELTARGET
     22  downloadmodel $CREPEURL | bunzip2 - > $MODELTARGET
    1423}
    1524
Note: See TracChangeset for help on using the changeset viewer.