Skip to content

Commit

Permalink
Update build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Sushmitha-Deva committed Nov 17, 2023
1 parent 2f64a9b commit 1676e84
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,39 @@ BUILD_DIR="build"
if [ ! -f "third_party/$LIBTORCH_FILE_NAME" ]; then
# If the file doesn't exist, download it
cd third_party
wget "$URL" >> libtorch_setup.txt
wget "$URL"
# Unzip the file
unzip "$LIBTORCH_FILE_NAME" >> libtorch_setup.txt
unzip "$LIBTORCH_FILE_NAME"
cd ..
fi

download_and_extract(){
URL=$1
FILE_NAME=$2
if [ ! -f "third_party/$FILE_NAME" ]; then
# If the file doesn't exist, download it
cd third_party
wget "$URL"
# Unzip the file
tar -xvzf "$FILE_NAME"
cd ..
fi

}

# Download OpenFST
URL="https://www.openfst.org/twiki/pub/FST/FstDownload/openfst-1.8.2.tar.gz"
OPENFST_FILE_NAME="openfst-1.8.2.tar.gz"
download_and_extract "$URL" "$OPENFST_FILE_NAME"



# Download boost
URL="https://github.com/parlance/ctcdecode/releases/download/v1.0/boost_1_67_0.tar.gz"
BOOST_FILE_NAME="boost_1_67_0.tar.gz"
download_and_extract "$URL" "$BOOST_FILE_NAME"


if [ ! -d "$BUILD_DIR" ]; then
mkdir "$BUILD_DIR"
fi
Expand Down

0 comments on commit 1676e84

Please sign in to comment.