Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
set -e
bib_src="$HOME/Brookhaven National Laboratory/NSLS-II SUF AI-ML - Beamline Optimization/LAB-20-2261_BL-opt.bib"
xml_src="$HOME/Brookhaven National Laboratory/NSLS-II SUF AI-ML - Beamline Optimization/LAB-20-2261_BL-opt.xml"
xml_dest="$HOME/Library/Containers/com.microsoft.Word/Data/Library/Application Support/Microsoft/Office/Sources.xml"
binary="/Applications/JabRef.localized/JabRef.app/Contents/MacOS/JabRef"
# Convert .bib file to .xml:
$binary -n -o "${xml_src}",MSBib "${bib_src}"
# Get some info about the files
stat "$bib_src"
echo
stat "$xml_src"
echo
stat "$xml_dest"
echo
cp -v "${xml_src}" "${xml_dest}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.