Skip to content

Commit

Permalink
improving test script /bin/testAllDevelopmentExamples.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
luis100 committed Mar 26, 2014
1 parent bbd9f38 commit f00132a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 109 deletions.
87 changes: 0 additions & 87 deletions bin/generateDebianPackages4AllToolspecs.sh

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
#!/bin/bash

TOOLSPECS=$(readlink -m $1)
TOOLWRAPPER_BASE_DIR=$(readlink -m $2)
DEBIAN_OUTPUT_DIRECTORY=$(readlink -m $3)
MAINTAINER_EMAIL=$4
cd "$(dirname "$0")"

usage(){
echo -e "Usage: $0 TOOLSPECS_DIR|TOOLSPEC TOOLWRAPPER_BASE_DIR DEBIAN_OUTPUT_DIRECTORY MAINTAINER_EMAIL
echo -e "Usage:
$0
Run with default values, where toolspecs are in 'developmentExamples', output directory is 'output_dir' and maintainer is info@scape-project.eu
$0 TOOLSPECS TOOLWRAPPER_BASE_DIR DEBIAN_OUTPUT_DIRECTORY MAINTAINER_EMAIL
\twhere:
\t TOOLSPECS_DIR|TOOLSPEC > path to the directory where the toolspecs are
\t or path to a specific toolspec
\t TOOLSPECS > path to the directory where the toolspecs are or path to a specific toolspec
\t TOOLWRAPPER_BASE_DIR > path to the toolwrapper base directory
\t DEBIAN_OUTPUT_DIRECTORY > path to the directory where the Debian packages are going to be copied
\t MAINTAINER_EMAIL > e-mail of the Debian package maintainer"
}

if [ $# -ne 4 ]; then
echo -e "\e[31mERROR: Please provide the 4 needed arguments\e[0m"
usage
exit 1
if [ $# -eq 0 ]; then
cd "$(dirname "$0")"
TOOLSPECS="../developmentExamples"
TOOLWRAPPER_BASE_DIR=$(readlink -m "..")
DEBIAN_OUTPUT_DIRECTORY=$(readlink -m "../output_dir")
MAINTAINER_EMAIL="info@scape-project.eu"
else
if [ $# -ne 4 ]; then
echo -e "\e[31mERROR: Wrong command syntax\e[0m"
usage
exit 1
else
TOOLSPECS=$(readlink -m $1)
TOOLWRAPPER_BASE_DIR=$(readlink -m $2)
DEBIAN_OUTPUT_DIRECTORY=$(readlink -m $3)
MAINTAINER_EMAIL=$4
cd "$(dirname "$0")"
fi
fi


if [ -d $TOOLSPECS ]; then
LS_EXPRESSION="$TOOLSPECS/*.xml"
else
Expand All @@ -34,15 +46,10 @@ else
fi
fi

echo -e "[WARN] This script only aplies to toolspecs with 1 operation, as the others need extra parameters for Debian package generation.\nDo you want to procede? [yN]"
read answer
case $answer in
[yY])
;;
*)
exit 1
;;
esac
echo -e "\e[33m[WARN] This script only aplies to toolspecs with 1 operation, as the others need extra parameters for Debian package generation.\e[0m"

rm -rf $DEBIAN_OUTPUT_DIRECTORY
mkdir -p $DEBIAN_OUTPUT_DIRECTORY

COUNT=0
OK=0
Expand Down

0 comments on commit f00132a

Please sign in to comment.