Skip to content

Instantly share code, notes, and snippets.

@kahenteikou
Last active November 13, 2020 10:15
Show Gist options
  • Save kahenteikou/3ed13338798b05b3aff8fc86fb485b89 to your computer and use it in GitHub Desktop.
Save kahenteikou/3ed13338798b05b3aff8fc86fb485b89 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
FILE_ID=1mIxeAPOPUBESAe3csvRUKsbDU_iwVsnl
FILE_NAME=NEUTRINO.zip
curl -sc ./cookie "https://drive.google.com/uc?export=download&id=${FILE_ID}" > /dev/null
#CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)"
#curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=${FILE_ID}" -o ${FILE_NAME}a
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${FILE_ID}" -o ${FILE_NAME}
unzip NEUTRINO.zip
cd NEUTRINO
perl -0777 -pe 's/libnetcdf.so.15/libnetcdf.so.18/g' bin/NEUTRINO > bin/NEUTRINO.old
perl -0777 -pe 's/so.1.71.0/so.1.72.0/g' NSF/bin/currennt > NSF/bin/currennt.old
perl -0777 -pe 's/so.1.71.0/so.1.72.0/g' NSF/bin/currennt.old > NSF/bin/currennt
perl -0777 -pe 's/libcublas.so.10/libcublas.so.11/g' NSF/bin/currennt > NSF/bin/currennt.old
xxd NSF/bin/currennt.old | sed "s/3021 f60e 0000 09/3121 f60e 0000 01/g" | xxd -r > NSF/bin/currennt
xxd bin/NEUTRINO.old | sed "s/3021 f60e 0000 07/3121 f60e 0000 01/g" | xxd -r > bin/NEUTRINO
chmod +x bin/NEUTRINO
chmod +x bin/WORLD
chmod +x bin/musicXMLtoLabel
chmod +x bin/NSF_IO
chmod +x NSF/Run.sh
chmod +x NSF/bin/currennt
chmod +x Run.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment