fetch_fn_names.sh (575B)
1 #!/bin/bash 2 # This Source Code Form is subject to the terms of the Mozilla Public 3 # License, v. 2.0. If a copy of the MPL was not distributed with this 4 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 5 6 # This script assumes to have rust-code-analysis-cli in the path. 7 HG_URL=$1 8 TEMPDIR=/tmp/fetch_fn_names_$$ 9 TEMPSRC=$TEMPDIR/src 10 mkdir $TEMPDIR 11 echo "" > $TEMPDIR/empty.json 12 HG_URL=`echo $HG_URL | sed 's/annotate/raw-file/g'` 13 wget -q -O "$TEMPSRC" $HG_URL 14 rust-code-analysis-cli -m -O json -p "$TEMPSRC" 15 CONTENT=`cat $TEMPDIR/*.json` 16 rm -rf $TEMPDIR 17 echo $CONTENT