aboutsummaryrefslogtreecommitdiff
path: root/test/shunit2-2.0.3/bin
diff options
context:
space:
mode:
authorPjotr Prins2017-08-20 09:22:43 +0000
committerPjotr Prins2017-08-20 09:22:43 +0000
commit2e76646998df0ca1b7d160329c0f3ac8cdda2fe0 (patch)
tree8a1ba0770e2344469c58290d4192db186d9439cb /test/shunit2-2.0.3/bin
parent7fc4e3c0a0d6e32ca6685647e107473f1d96c3e5 (diff)
downloadpangemma-2e76646998df0ca1b7d160329c0f3ac8cdda2fe0.tar.gz
Move shunit2 into ./contrib and add catch-1.8.7
Diffstat (limited to 'test/shunit2-2.0.3/bin')
-rwxr-xr-xtest/shunit2-2.0.3/bin/docbookPrep.sh97
-rwxr-xr-xtest/shunit2-2.0.3/bin/extractDocs.pl40
-rwxr-xr-xtest/shunit2-2.0.3/bin/which36
3 files changed, 0 insertions, 173 deletions
diff --git a/test/shunit2-2.0.3/bin/docbookPrep.sh b/test/shunit2-2.0.3/bin/docbookPrep.sh
deleted file mode 100755
index eb7c270..0000000
--- a/test/shunit2-2.0.3/bin/docbookPrep.sh
+++ /dev/null
@@ -1,97 +0,0 @@
-#! /bin/sh
-# $Id$
-
-XML_VERSION='4.4'
-XML_FILE="docbook-xml-${XML_VERSION}"
-XML_URL="http://www.docbook.org/xml/${XML_VERSION}/${XML_FILE}.zip"
-
-XSL_VERSION='1.72.0'
-XSL_FILE="docbook-xsl-${XSL_VERSION}"
-XSL_URL="http://downloads.sourceforge.net/docbook/${XSL_FILE}.tar.bz2"
-
-#-----------------------------------------------------------------------------
-# do no edit below here
-#-----------------------------------------------------------------------------
-
-PATH="${PATH}:${MY_DIR}"
-PWD=${PWD:-`pwd`}
-
-MY_BASE=`basename "$0"`
-MY_DIR=`dirname "$0"`
-
-# load shlib
-. "${MY_DIR}/../lib/sh/shlib"
-
-BASE_DIR=`shlib_relToAbsPath "${MY_DIR}/.."`
-DL_DIR="${BASE_DIR}/tmp"
-DOCBOOK_DIR="${BASE_DIR}/share/docbook"
-
-CURL_OPTS='-C - -Os'
-WGET_OPTS='-cq'
-
-METHOD_NONE=0
-METHOD_WGET=1
-METHOD_CURL=2
-
-get_url()
-{
- url=$1
- case ${method} in
- ${METHOD_CURL}) ${curl} ${CURL_OPTS} "${url}" ;;
- ${METHOD_WGET}) ${wget} ${WGET_OPTS} "${url}" ;;
- esac
-}
-
-# determine method
-method=${METHOD_NONE}
-wget=`which wget`
-[ $? -eq 0 ] && method=${METHOD_WGET}
-curl=`which curl`
-[ $? -eq 0 -a ${method} -eq ${METHOD_NONE} ] && method=${METHOD_CURL}
-if [ ${method} -eq ${METHOD_NONE} ]; then
- echo "unable to locate wget or curl. cannot continue"
- exit 1
-fi
-
-# create download dir
-mkdir -p "${DL_DIR}"
-
-# get the docbook xml files
-echo 'Docbook XML'
-echo ' downloading'
-cd ${DL_DIR}
-get_url "${XML_URL}"
-if [ -f "${DL_DIR}/${XML_FILE}.zip" ]; then
- echo ' extracting'
- xml_dir="${DOCBOOK_DIR}/docbook-xml/${XML_VERSION}"
- rm -fr "${xml_dir}"
- mkdir -p "${xml_dir}"
- cd "${xml_dir}"
- unzip -oq "${DL_DIR}/${XML_FILE}.zip"
- cd ..
- rm -f current
- ln -s "${XML_VERSION}" current
-else
- echo "error: unable to extract (${XML_FILE}.zip)" >&2
- exit 1
-fi
-
-# get the docbook xslt files
-echo 'Docbook XSLT'
-echo ' downloading'
-cd ${DL_DIR}
-get_url "${XSL_URL}"
-if [ -f "${DL_DIR}/${XSL_FILE}.tar.bz2" ]; then
- echo ' extracting'
- xsl_dir="${DOCBOOK_DIR}/docbook-xsl"
- mkdir -p "${xsl_dir}"
- cd "${xsl_dir}"
- rm -fr ${XSL_VERSION}
- bzip2 -dc "${DL_DIR}/${XSL_FILE}.tar.bz2" |tar xf -
- mv ${XSL_FILE} ${XSL_VERSION}
- rm -f current
- ln -s "${XSL_VERSION}" current
-else
- echo "error: unable to extract (${XSL_FILE}.tar.bz2)" >&2
- exit 1
-fi
diff --git a/test/shunit2-2.0.3/bin/extractDocs.pl b/test/shunit2-2.0.3/bin/extractDocs.pl
deleted file mode 100755
index a803526..0000000
--- a/test/shunit2-2.0.3/bin/extractDocs.pl
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /usr/bin/perl
-# $Id$
-
-if(@ARGV != 1) {
- print "usage: $0 sourceFile\n";
- exit;
-}
-
-$sourceFile = $ARGV[0];
-
-#
-# read in the source file
-#
-$rslt = open(FILE, $sourceFile)
- || die "could not open file ($sourceFile)";
-
-$inComment = 0;
-while(<FILE>) {
- next if /^[^#]/;
- s/^# //;
- s/^#//;
-
- if(/^\/\*\*/) {
- $inComment = 1;
- next;
- }
- if(/\*\/$/) {
- $inComment = 0;
- next;
- }
-
- if ($inComment == 1) { print $_ };
- if ($inComment == 0 && /\/\/\*/) {
- @line = split /\/\/\*/, $_, 2;
- $line[1] =~ s/^ //;
- print $line[1];
- }
-}
-
-close(FILE);
diff --git a/test/shunit2-2.0.3/bin/which b/test/shunit2-2.0.3/bin/which
deleted file mode 100755
index 9d7cc9f..0000000
--- a/test/shunit2-2.0.3/bin/which
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# $Id$
-#
-# This is a simple implementation of the 'which' command for those OSes that
-# don't have one.
-#
-
-true; TRUE=$?
-false; FALSE=$?
-
-showAll=${FALSE}
-
-# process command line flags
-while getopts 'a' opt; do
- case ${opt} in
- a) showAll=${TRUE}
- esac
-done
-shift `expr ${OPTIND} - 1`
-
-# exit if no arguments were given
-[ $# -eq 0 ] && exit 1
-
-command=$1
-
-# search for command
-out=`echo "${PATH}" |sed "s/:/\n/g" |\
-while read path; do
- fullPath="${path}/${command}"
- if [ -x "${fullPath}" ]; then
- echo "${fullPath}"
- [ ${showAll} -eq ${FALSE} ] && break
- fi
-done`
-[ -z "${out}" ] && exit 1
-echo "${out}"