File: compile_fail.sh

package info (click to toggle)
howardhinnant-date 3.0.3%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,456 kB
  • sloc: cpp: 29,835; sh: 204; ansic: 23; makefile: 19
file content (16 lines) | stat: -rwxr-xr-x 358 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
export TEST_BIN_NAME=$1
#echo "Building ${TEST_BIN_NAME}"
shift 1
export BUILD_COMMAND=$@
#echo "Build command: ${BUILD_COMMAND}"
eval ${BUILD_COMMAND} >/dev/null 2>/dev/null

if [ $? -eq 0 ]; then
	echo -ne "#!/bin/bash\nexit 1;" > ${TEST_BIN_NAME}
else
	echo -ne "#!/bin/bash\nexit 0;" > ${TEST_BIN_NAME}
fi
chmod u+x ${TEST_BIN_NAME}
exit 0;