2019-11-28 10:28:03 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# This bash script automates the tests
|
|
|
|
|
2019-11-28 13:04:03 +00:00
|
|
|
mkdir -p testDir
|
|
|
|
|
|
|
|
cd testDir
|
|
|
|
|
2019-11-28 12:04:22 +00:00
|
|
|
wget https://github.com/stephengaito/pdf2htmlEX/releases/download/continuous/appImageName
|
|
|
|
|
2019-11-28 13:04:03 +00:00
|
|
|
export APPIMAGE_NAME=$(cat appImageName)
|
2019-11-28 12:04:22 +00:00
|
|
|
|
2019-11-28 13:04:03 +00:00
|
|
|
wget https://github.com/stephengaito/pdf2htmlEX/releases/download/continuous/$APPIMAGE_NAME
|
2019-11-28 12:04:22 +00:00
|
|
|
|
2019-11-28 13:04:03 +00:00
|
|
|
chmod a+x $APPIMAGE_NAME
|
2019-11-28 12:04:22 +00:00
|
|
|
|
2019-11-28 13:04:03 +00:00
|
|
|
if ! ./$APPIMAGE_NAME --version ; then
|
2019-11-28 12:04:22 +00:00
|
|
|
echo "COULD NOT run the AppImage"
|
2019-11-28 13:04:03 +00:00
|
|
|
exit 1
|
2019-11-28 12:04:22 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -x "$(which docker)" ]; then
|
|
|
|
|
|
|
|
wget https://github.com/stephengaito/pdf2htmlEX/releases/download/continuous/dockerImageName
|
|
|
|
|
|
|
|
export DOCKER_IMAGE_NAME=$(cat dockerImageName)
|
|
|
|
|
|
|
|
if ! docker run $DOCKER_IMAGE_NAME --version ; then
|
2019-11-28 13:04:03 +00:00
|
|
|
echo "COULD NOT run the Docker Image"
|
|
|
|
exit 1
|
2019-11-28 12:04:22 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2019-11-28 10:28:03 +00:00
|
|
|
|