-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
1,528 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/bash | ||
|
||
DEFAULT_SPICE_ROOT="$HOME/.cache/aac-metrics/spice" | ||
|
||
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then | ||
echo "Install all files for running the java SPICE program in the SPICE_ROOT directory." | ||
echo "The default spice root path is \"${DEFAULT_SPICE_ROOT}\"." | ||
echo "Usage: $0 [SPICE_ROOT]" | ||
exit 0 | ||
fi | ||
|
||
dpath_spice="$1" | ||
if [ "$dpath_spice" = "" ]; then | ||
dpath_spice="${DEFAULT_SPICE_ROOT}" | ||
fi | ||
|
||
if [ ! -d "$dpath_spice" ]; then | ||
echo "Error: SPICE_ROOT \"$dpath_spice\" is not a directory." | ||
exit 1 | ||
fi | ||
|
||
fname_zip="SPICE-1.0.zip" | ||
fpath_zip="$dpath_spice/$fname_zip" | ||
bn0=`basename $0` | ||
|
||
echo "[$bn0] Start installation of SPICE metric java code in directory \"$dpath_spice\"..." | ||
|
||
if [ ! -f "$fpath_zip" ]; then | ||
echo "[$bn0] Zip file not found, downloading from https://panderson.me..." | ||
wget https://panderson.me/images/SPICE-1.0.zip -P "$dpath_spice" | ||
fi | ||
|
||
dpath_unzip="$dpath_spice/SPICE-1.0" | ||
if [ ! -d "$dpath_unzip" ]; then | ||
echo "[$bn0] Unzipping file $dpath_zip..." | ||
unzip $fpath_zip -d "$dpath_spice" | ||
|
||
echo "[$bn0] Downloading Stanford models..." | ||
bash $dpath_unzip/get_stanford_models.sh | ||
fi | ||
|
||
dpath_lib="$dpath_spice/lib" | ||
if [ ! -d "$dpath_lib" ]; then | ||
echo "[$bn0] Moving lib directory to \"$dpath_spice\"..." | ||
mv "$dpath_unzip/lib" "$dpath_spice" | ||
fi | ||
|
||
fpath_jar="$dpath_spice/spice-1.0.jar" | ||
if [ ! -f "$fpath_jar" ]; then | ||
echo "[$bn0] Moving spice-1.0.jar file to \"$dpath_spice\"..." | ||
mv "$dpath_unzip/spice-1.0.jar" "$dpath_spice" | ||
fi | ||
|
||
echo "[$bn0] SPICE metric Java code is installed." | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters