Permalink
Browse files

Minor .sh changes (#133)

1 parent f5a85d1 commit d9d32a6a86d66221056f98915a4ad02d883d9a2f @cassiosantos cassiosantos committed with jhauswald Nov 23, 2016
Showing with 79 additions and 56 deletions.
  1. +4 −3 lucida/calendar/CalendarClient/compile-Calendar-client.sh
  2. +2 −1 lucida/calendar/CalendarClient/start-Calendar-client.sh
  3. +2 −1 lucida/commandcenter/apache/install_apache.sh
  4. +1 −1 lucida/djinntonic/dig/run-test.sh
  5. +1 −1 lucida/djinntonic/face/run-test.sh
  6. +1 −0 lucida/djinntonic/imc/make_imc.sh
  7. +1 −1 lucida/djinntonic/imc/run-test.sh
  8. +1 −0 lucida/djinntonic/tools/install-caffe.sh
  9. +1 −0 lucida/djinntonic/tools/install-protobuf.sh
  10. +4 −4 lucida/questionanswering/OpenEphyra/scripts/EphyraTREC13To16.sh
  11. +2 −2 lucida/questionanswering/OpenEphyra/scripts/EphyraTREC8To11.sh
  12. +1 −0 lucida/questionanswering/OpenEphyra/src/info/ephyra/nlp/compile-snowball.sh
  13. +2 −1 lucida/questionanswering/OpenEphyra/start_server.sh
  14. +2 −1 lucida/questionanswering/OpenEphyra/start_test.sh
  15. +5 −5 lucida/speechrecognition/kaldi_gstreamer_asr/install_idlak.sh
  16. +1 −0 lucida/speechrecognition/kaldi_gstreamer_asr/install_kaldi.sh
  17. +1 −0 lucida/speechrecognition/kaldi_gstreamer_asr/install_kaldi_tts.sh
  18. +1 −0 lucida/speechrecognition/kaldi_gstreamer_asr/simple_start.sh
  19. +2 −2 lucida/speechrecognition/kaldi_gstreamer_asr/start.sh
  20. +5 −5 lucida/speechrecognition/kaldi_gstreamer_asr/test/models/download-fisher-nnet2.sh
  21. +2 −2 lucida/speechrecognition/kaldi_gstreamer_asr/test/models/download-tedlium-nnet2.sh
  22. +1 −0 tools/apt_deps.sh
  23. +3 −2 tools/clean.sh
  24. +1 −0 tools/deploy/cluster_up.sh
  25. +9 −8 tools/deploy/start_services.sh
  26. +1 −1 tools/download_wiki_index.sh
  27. +3 −2 tools/install_fbthrift.sh
  28. +1 −0 tools/install_java.sh
  29. +3 −2 tools/install_mongodb.sh
  30. +7 −6 tools/install_opencv.sh
  31. +2 −1 tools/install_python.sh
  32. +5 −4 tools/install_thrift.sh
  33. +1 −0 tools/start_all.sh
@@ -1,14 +1,15 @@
+#!/bin/bash
printdivision()
{
echo -e "\n"
- for i in `seq 1 70`; do
+ for i in $(seq 1 70); do
echo -n "/";
done
echo -e "\n"
}
# Generate thrift files
-echo -e "./compile-Calendar-client.sh: `pwd`"
+echo -e "./compile-Calendar-client.sh: $(pwd)"
echo -e "./compile-Calendar-client.sh: Compiling thrift source code..."
thrift --gen java ../../lucidaservice.thrift
thrift --gen java ../../lucidatypes.thrift
@@ -21,4 +22,4 @@ export JAVA_CLASS_PATH=$JAVA_CLASS_PATH:lib/libthrift-0.9.3.jar:lib/slf4j-api-1.
# Use cp flag to avoid cluttering up the CLASSPATH environment variable
echo -e "javac -cp $JAVA_CLASS_PATH CalendarClient.java thrift/LucidaService.java thrift/QueryInput.java thrift/QuerySpec.java
\n\n"
-javac -cp $JAVA_CLASS_PATH CalendarClient.java thrift/LucidaService.java thrift/QueryInput.java thrift/QuerySpec.java
+javac -cp "$JAVA_CLASS_PATH" CalendarClient.java thrift/LucidaService.java thrift/QueryInput.java thrift/QuerySpec.java
@@ -1,7 +1,8 @@
+#!/bin/bash
# Add Thrift classes to class path
export JAVA_CLASS_PATH=$JAVA_CLASS_PATH:thrift
# Add other jar files to class path
export JAVA_CLASS_PATH=$JAVA_CLASS_PATH:lib/libthrift-0.9.3.jar:lib/slf4j-api-1.7.13.jar:lib/slf4j-simple-1.7.13.jar
# run the server
-java -cp $JAVA_CLASS_PATH CalendarClient "$@"
+java -cp "$JAVA_CLASS_PATH" CalendarClient "$@"
@@ -1,3 +1,4 @@
+#!/bin/bash
: "${LUCIDAROOT:?Need to set LUCIDAROOT non-empty}"
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
sudo apt-get update
@@ -7,5 +8,5 @@ sudo apt-get install -y \
apache2-utils \
libapache2-mod-wsgi \
python-pip
-cp -f $LUCIDAROOT/commandcenter/apache/conf/000-default.conf /etc/apache2/sites-available/000-default.conf
+cp -f "$LUCIDAROOT"/commandcenter/apache/conf/000-default.conf /etc/apache2/sites-available/000-default.conf
sudo a2enmod ssl # for https
@@ -4,5 +4,5 @@ FILES=$(find input/ -type f -name '*.*')
for f in $FILES
do
echo "processing $f"
- python ../gen-py/LucidaService-remote -h localhost:8087 infer $f 2
+ python ../gen-py/LucidaService-remote -h localhost:8087 infer "$f" 2
done
@@ -4,5 +4,5 @@ FILES=$(find input/ -type f -name '*.*')
for f in $FILES
do
echo "processing $f"
- python ../gen-py/LucidaService-remote -h localhost:8086 infer $f 2
+ python ../gen-py/LucidaService-remote -h localhost:8086 infer "$f" 2
done
@@ -1,3 +1,4 @@
+#!/bin/bash
cd ..
python -mthrift_compiler.main --gen cpp2 lucidaservice.thrift
python -mthrift_compiler.main --gen cpp2 lucidatypes.thrift
@@ -4,5 +4,5 @@ FILES=$(find input/ -type f -name '*.*')
for f in $FILES
do
echo "processing $f"
- python ../gen-py/LucidaService-remote -h localhost:8085 infer $f 2
+ python ../gen-py/LucidaService-remote -h localhost:8085 infer "$f" 2
done
@@ -1,3 +1,4 @@
+#!/bin/bash
## Install Djinn specific version of Caffe
export CPU_ONLY=1
@@ -1,3 +1,4 @@
+#!/bin/bash
export PROTOBUF_VERSION=2.5.0
if [ -z "$THREADS" ]; then
@@ -14,7 +14,7 @@ export ASSERT=$5
cd ..
java -server -Xms1000m -Xmx1400m -Djava.library.path=lib/search/ \
- info.ephyra.trec.EphyraTREC13To16 res/testdata/trec/$1questions.xml \
- tag=$1_$2_out log=log/$1_$2 lflags=$3 \
- fp=res/testdata/trec/$1patterns_factoid \
- lp=res/testdata/trec/$1patterns_list
+ info.ephyra.trec.EphyraTREC13To16 res/testdata/trec/"$1"questions.xml \
+ tag="$1_$2_out" log=log/"$1_$2" lflags="$3" \
+ fp=res/testdata/trec/"$1"patterns_factoid \
+ lp=res/testdata/trec/"$1"patterns_list
@@ -14,5 +14,5 @@ export ASSERT=$4
cd ..
java -server -Xms1000m -Xmx1400m -Djava.library.path=lib/search/ \
- info.ephyra.trec.EphyraTREC8To11 res/testdata/trec/$1questions \
- res/testdata/trec/$1patterns log=log/$1_$2
+ info.ephyra.trec.EphyraTREC8To11 res/testdata/trec/"$1"questions \
+ res/testdata/trec/"$1"patterns log=log/"$1_$2"
@@ -1,2 +1,3 @@
+#!/bin/bash
javac -cp .:../../../../lib/nlp/snowball.jar SnowballStemmer.java
mv SnowballStemmer.class ../../../../bin/info/ephyra/nlp/
@@ -1 +1,2 @@
-java -Djava.library.path=lib/search/ -classpath bin:lib/learn/jsoup-1.8.3.jar:lib/ml/maxent.jar:lib/ml/minorthird.jar:lib/nlp/jwnl.jar:lib/nlp/lingpipe.jar:lib/nlp/opennlp-tools.jar:lib/nlp/plingstemmer.jar:lib/nlp/snowball.jar:lib/nlp/stanford-ner.jar:lib/nlp/stanford-parser.jar:lib/nlp/stanford-postagger.jar:lib/qa/javelin.jar:lib/search/bing-search-java-sdk.jar:lib/search/googleapi.jar:lib/search/indri.jar:lib/search/yahoosearch.jar:lib/thrift/libthrift-0.9.2.jar:lib/thrift/log4j-1.2.14.jar:lib/thrift/slf4j-api-1.5.8.jar:lib/thrift/slf4j-log4j12-1.5.8.jar:lib/util/commons-logging.jar:lib/util/gson.jar:lib/util/htmlparser.jar:lib/util/jetty-all.jar:lib/util/log4j.jar:lib/util/servlet-api.jar:lib/util/trove.jar:lib/db/mongo-java-driver-3.2.2.jar lucida.main.QADaemon
+#!/bin/bash
+java -Djava.library.path=lib/search/ -classpath bin:lib/learn/jsoup-1.8.3.jar:lib/ml/maxent.jar:lib/ml/minorthird.jar:lib/nlp/jwnl.jar:lib/nlp/lingpipe.jar:lib/nlp/opennlp-tools.jar:lib/nlp/plingstemmer.jar:lib/nlp/snowball.jar:lib/nlp/stanford-ner.jar:lib/nlp/stanford-parser.jar:lib/nlp/stanford-postagger.jar:lib/qa/javelin.jar:lib/search/bing-search-java-sdk.jar:lib/search/googleapi.jar:lib/search/indri.jar:lib/search/yahoosearch.jar:lib/thrift/libthrift-0.9.2.jar:lib/thrift/log4j-1.2.14.jar:lib/thrift/slf4j-api-1.5.8.jar:lib/thrift/slf4j-log4j12-1.5.8.jar:lib/util/commons-logging.jar:lib/util/gson.jar:lib/util/htmlparser.jar:lib/util/jetty-all.jar:lib/util/log4j.jar:lib/util/servlet-api.jar:lib/util/trove.jar:lib/db/mongo-java-driver-3.2.2.jar lucida.main.QADaemon
@@ -1 +1,2 @@
-java -classpath bin:lib/learn/jsoup-1.8.3.jar:lib/ml/maxent.jar:lib/ml/minorthird.jar:lib/nlp/jwnl.jar:lib/nlp/lingpipe.jar:lib/nlp/opennlp-tools.jar:lib/nlp/plingstemmer.jar:lib/nlp/snowball.jar:lib/nlp/stanford-ner.jar:lib/nlp/stanford-parser.jar:lib/nlp/stanford-postagger.jar:lib/qa/javelin.jar:lib/search/bing-search-java-sdk.jar:lib/search/googleapi.jar:lib/search/indri.jar:lib/search/yahoosearch.jar:lib/thrift/libthrift-0.9.2.jar:lib/thrift/log4j-1.2.14.jar:lib/thrift/slf4j-api-1.5.8.jar:lib/thrift/slf4j-log4j12-1.5.8.jar:lib/util/commons-logging.jar:lib/util/gson.jar:lib/util/htmlparser.jar:lib/util/jetty-all.jar:lib/util/log4j.jar:lib/util/servlet-api.jar:lib/util/trove.jar:lib/db/mongo-java-driver-3.2.2.jar lucida.test.QAClient
+#!/bin/bash
+java -classpath bin:lib/learn/jsoup-1.8.3.jar:lib/ml/maxent.jar:lib/ml/minorthird.jar:lib/nlp/jwnl.jar:lib/nlp/lingpipe.jar:lib/nlp/opennlp-tools.jar:lib/nlp/plingstemmer.jar:lib/nlp/snowball.jar:lib/nlp/stanford-ner.jar:lib/nlp/stanford-parser.jar:lib/nlp/stanford-postagger.jar:lib/qa/javelin.jar:lib/search/bing-search-java-sdk.jar:lib/search/googleapi.jar:lib/search/indri.jar:lib/search/yahoosearch.jar:lib/thrift/libthrift-0.9.2.jar:lib/thrift/log4j-1.2.14.jar:lib/thrift/slf4j-api-1.5.8.jar:lib/thrift/slf4j-log4j12-1.5.8.jar:lib/util/commons-logging.jar:lib/util/gson.jar:lib/util/htmlparser.jar:lib/util/jetty-all.jar:lib/util/log4j.jar:lib/util/servlet-api.jar:lib/util/trove.jar:lib/db/mongo-java-driver-3.2.2.jar lucida.test.QAClient
@@ -1,6 +1,6 @@
#!/bin/bash
# Only run this script inside `kaldi_tts`.
-# This script attempts to automatically execute the instructions in
+# This script attempts to automatically execute the instructions in
# INSTALL_IDLAK.
# (1) Install instructions for expat
@@ -53,9 +53,9 @@ echo "****(2) Installing pugixml"
cd pugixml-1.2
tar -xovzf ../pugixml-1.2.tar.gz || exit 1
cd scripts
- if [ "`uname`" == "Darwin" ]; then
+ if [ "$(uname)" == "Darwin" ]; then
# OS X 10.9, 10.10 require CXXFLAGS += -stdlib=libstdc++ to compile pugixml
- osx_ver=`sw_vers | grep ProductVersion | awk '{print $2}' | awk '{split($0,a,"\."); print a[1] "." a[2]; }'`
+ osx_ver=$(sw_vers | grep ProductVersion | awk '{print $2}' | awk '{split($0,a,"\."); print a[1] "." a[2]; }')
echo "Configuring for OS X version $osx_ver ..."
if [ "$osx_ver" == "10.9" ]; then
cmake -DCMAKE_CXX_FLAGS=-stdlib=libstdc++
@@ -89,7 +89,7 @@ echo "****(3) Installing pcre with utf8 support"
else
tar -xovjf pcre-8.20.tar.bz2 || exit 1
cd pcre-8.20
- ./configure --enable-utf8 --enable-unicode-properties --enable-newline-is-anycrlf --prefix=`pwd` || exit 1
+ ./configure --enable-utf8 --enable-unicode-properties --enable-newline-is-anycrlf --prefix="$(pwd)" || exit 1
sed -i "s/CPPFLAGS =/CPPFLAGS = -fPIC/g" Makefile
make || exit 1
make install || exit 1
@@ -113,7 +113,7 @@ echo "****(4) Installing SPTK"
mkdir -p SPTK
tar -xovzf SPTK-3.9.tar.gz || exit 1
cd SPTK-3.9
- ./configure --prefix=`pwd`/../SPTK || exit 1
+ ./configure --prefix="$(pwd)"/../SPTK || exit 1
make || exit 1
make install || exit 1
cd ..
@@ -1,3 +1,4 @@
+#!/bin/bash
LUCIDAROOT=$(pwd)/../../
git clone https://github.com/kaldi-asr/kaldi.git
cd kaldi
@@ -1,3 +1,4 @@
+#!/bin/bash
LUCIDAROOT=$(pwd)/../../
git clone https://github.com/bpotard/idlak.git
mv idlak kaldi_tts
@@ -1,3 +1,4 @@
+#!/bin/bash
export GST_PLUGIN_PATH=$(pwd)/kaldi/tools/gst-kaldi-nnet2-online/src
gnome-terminal -x bash -c "python kaldigstserver/worker.py -u ws://localhost:8081/worker/ws/speech -c sample_english_nnet2.yaml; read -n1"
@@ -33,10 +33,10 @@ fi;
if [ "$MASTER" == "localhost" ] ; then
# start a local master
- python /kaldigstserver/master_server.py --port=$PORT 2>> master.log &
+ python /kaldigstserver/master_server.py --port="$PORT" 2>> master.log &
fi
#start worker and connect it to the master
export GST_PLUGIN_PATH=kaldi/tools/gst-kaldi-nnet2-online/src/:kaldi/src/gst-plugin/
-python kaldigstserver/worker.py -c $YAML -u ws://$MASTER:$PORT/worker/ws/speech 2>> worker.log &
+python kaldigstserver/worker.py -c "$YAML" -u ws://"$MASTER:$PORT"/worker/ws/speech 2>> worker.log &
@@ -1,15 +1,15 @@
-#! /bin/bash
+#!/bin/bash
BASE_URL=http://kaldi-asr.org/downloads/build/2/sandbox/online/egs/fisher_english/s5
MODEL=exp/nnet2_online/nnet_a_gpu_online
GRAPH=exp/tri5a
-modeldir=`dirname $0`/english/fisher_nnet_a_gpu_online
+modeldir=$(dirname "$0")/english/fisher_nnet_a_gpu_online
-mkdir -p $modeldir
+mkdir -p "$modeldir"
-cd $modeldir
+cd "$modeldir"
wget -N $BASE_URL/$MODEL/final.mdl || exit 1
(mkdir -p ivector_extractor; cd ivector_extractor; wget -N $BASE_URL/$MODEL/ivector_extractor/{final.ie,final.dubm,final.mat,global_cmvn.stats}) || exit 1
@@ -21,4 +21,4 @@ wget -N $BASE_URL/$GRAPH/graph/words.txt || exit 1
cat conf/ivector_extractor.conf | perl -npe "s/=.*nnet_a_gpu_online\//=test\/models\/english\/fisher_nnet_a_gpu_online\//" > conf/ivector_extractor.fixed.conf
-cd -
+cd -
@@ -1,3 +1,3 @@
-#! /bin/bash
+#!/bin/bash
-curl https://phon.ioc.ee/~tanela/tedlium_nnet_ms_sp_online.tgz | tar zxv
+curl https://phon.ioc.ee/~tanela/tedlium_nnet_ms_sp_online.tgz | tar zxv
View
@@ -1,3 +1,4 @@
+#!/bin/bash
## Installs all package manager dependencies
## FROM ubuntu:14.04
## Run as sudo
View
@@ -1,3 +1,4 @@
+#!/bin/bash
# Clean up script
rm -rf caffe
@@ -11,7 +12,7 @@ rm -rf mongo-cxx-driver
for tar in *.tar.gz;
do
- if [ -f $tar ]; then
- rm $tar
+ if [ -f "$tar" ]; then
+ rm "$tar"
fi
done
@@ -1,3 +1,4 @@
+#!/bin/bash
# Set up a local cluster via docker on a single machine.
export K8S_VERSION=v1.3.0
export ARCH=amd64
@@ -1,38 +1,39 @@
+#!/bin/bash
echo "Assume that the local cluster is set up."
kubectl cluster-info
kubectl describe node
-filelist=$(ls *-controller.yaml)
+filelist=$(ls ./*-controller.yaml)
if [ "${filelist}" != "" ]; then
for d in ${filelist}; do
echo "***** ${d}"
- kubectl delete -f ${d}
+ kubectl delete -f "${d}"
done
fi
-filelist=$(ls *-service.yaml)
+filelist=$(ls ./*-service.yaml)
if [ "${filelist}" != "" ]; then
for d in ${filelist}; do
echo "***** ${d}"
- kubectl delete -f ${d}
+ kubectl delete -f "${d}"
done
fi
-filelist=$(ls *-service.yaml)
+filelist=$(ls ./*-service.yaml)
if [ "${filelist}" != "" ]; then
for d in ${filelist}; do
echo "***** ${d}"
- kubectl create -f ${d} --validate=false
+ kubectl create -f "${d}" --validate=false
done
fi
-filelist=$(ls *-controller.yaml)
+filelist=$(ls ./*-controller.yaml)
if [ "${filelist}" != "" ]; then
for d in ${filelist}; do
echo "***** ${d}"
- kubectl create -f ${d} --validate=false
+ kubectl create -f "${d}" --validate=false
done
fi
@@ -9,5 +9,5 @@ else
fi
echo "******************************************************"
-echo "Make sure to export wiki_indri_index=`pwd`/wiki_indri_index"
+echo "Make sure to export wiki_indri_index=$(pwd)/wiki_indri_index"
echo "******************************************************"
@@ -1,3 +1,4 @@
+#!/bin/bash
installCheck () {
if [ ! -d fbthrift ]; then
return 1
@@ -11,7 +12,7 @@ installCheck () {
fi
}
-if installCheck $0; then
+if installCheck "$0"; then
echo "Facebook Thrift installed";
exit 0;
fi
@@ -51,7 +52,7 @@ cd ..
# rm -rf .git
cd ..
-if installCheck $0; then
+if installCheck "$0"; then
echo "Facebook Thrift installed";
exit 0;
else
@@ -1,3 +1,4 @@
+#!/bin/bash
export JAVA_VERSION=8
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
@@ -1,3 +1,4 @@
+#!/bin/bash
export MONGO_C_DRIVER_VERSION=1.3.0
installCheck () {
@@ -13,7 +14,7 @@ installCheck () {
fi
}
-if installCheck $0; then
+if installCheck "$0"; then
echo "MongoDB and C++ driver installed";
exit 0;
fi
@@ -62,7 +63,7 @@ sudo scons --prefix=/usr/local --c++11=on --ssl install
rm -rf .git
cd ..
-if installCheck $0; then
+if installCheck "$0"; then
echo "MongoDB and C++ driver installed";
exit 0;
else
@@ -1,3 +1,4 @@
+#!/bin/bash
export OPENCV_VERSION=2.4.9
installCheck () {
@@ -10,24 +11,24 @@ installCheck () {
fi
}
-if installCheck $0; then
+if installCheck "$0"; then
echo "OpenCV already installed, skipping"
exit 0
fi
git clone https://github.com/Itseez/opencv.git opencv-$OPENCV_VERSION \
- && cd opencv-$OPENCV_VERSION \
- && git checkout $OPENCV_VERSION \
+ && cd "opencv-$OPENCV_VERSION" \
+ && git checkout "$OPENCV_VERSION" \
&& mkdir build \
&& cd build \
&& cmake .. \
- && make -j$THREADS \
- && sudo make -j$THREADS install \
+ && make -j"$THREADS" \
+ && sudo make -j"$THREADS" install \
&& cd ../ \
&& rm -rf .git \
&& cd ../
-if installCheck $0; then
+if installCheck "$0"; then
echo "OpenCV installed";
exit 0;
else
@@ -1,3 +1,4 @@
+#!/bin/bash
if [ -d localpython2_7_9 ];
then
echo "Virtual Python environment installed."
@@ -7,7 +8,7 @@ wget http://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
mkdir localpython2_7_9
tar -zxvf Python-2.7.9.tgz
cd Python-2.7.9
-./configure --prefix=$(pwd)/../localpython2_7_9
+./configure --prefix="$(pwd)"/../localpython2_7_9
make
make install
cd ../
Oops, something went wrong.

0 comments on commit d9d32a6

Please sign in to comment.