nosqlbench/nb/nb-scripts/link-jar-name.sh

35 lines
591 B
Bash
Raw Normal View History

#!/bin/bash
set -e
set -x
NBJAR_VERSION=${NBJAR_VERSION:?NBJAR_VERSION must be specified}
echo "NBJAR_VERSION: ${NBJAR_VERSION}"
2020-05-05 01:09:16 -05:00
2020-03-23 13:05:35 -05:00
cd target
if [ -e "nb.jar" ]
then
echo "nb.jar link exists, skipping"
2020-03-25 09:31:52 -05:00
exit 0
2020-03-23 13:05:35 -05:00
fi
2020-03-25 09:31:52 -05:00
2020-05-05 01:09:16 -05:00
for qualifier in jar-with-dependencies
do
JARNAME="nb-${NBJAR_VERSION}-${qualifier}.jar"
if [ -e "$JARNAME" ]
then
echo "linking $JARNAME to nb.jar"
ln -s $JARNAME nb.jar
echo "linked $JARNAME to nb.jar, exiting"
exit 0
else
echo "$JARNAME does not exist, skipping"
fi
done
echo "Unable to find any jar to link to nb.jar name.."
exit 2