1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
TP-Link_Archer-XR500v/BBA1.5_platform/apps/public/flex-2.5.35/tests/create-test
2024-07-22 01:58:46 -03:00

34 lines
559 B
Bash

#!/bin/sh
TESTFILES="Makefile.am scanner.l parser.y .cvsignore test.input"
if [ ! $# -eq 1 ] ; then
echo 1>&2 Usage: $0 test-name
exit 1
fi
if test -e "$1" ; then
echo 1>&2 "$1 exists already"
exit 1
fi
mkdir $1
if test "$?" -ne 0 ; then
echo 1>&2 "mkdir $1 failed"
exit 1
fi
for i in $TESTFILES ; do
cp TEMPLATE/$i $1/$i
done
echo "$1" >> "$1"/.cvsignore
sed -i '/--new-test-here--/i\
tests/'"$1"'/Makefile' ../configure.in
sed -i '/^\(DIST_\)\?SUBDIRS/a\
'"$1"' \\' Makefile.am
sed -i "s:TEMPLATE:$1:g" "$1"/Makefile.am