58 lines · 567 B · Text
RawDownload
#!/bin/sh # Find the -o or -c argument.iscc=0next=0out=a.outfor ido	case "$next" in	1)		out="$i"		next=0		;;	esac	case "$i" in	-o)		next=1		;;	-c)		iscc=1		;;	esacdone case "$out" in/*)	;;*)	out="`pwd`/$out"	;;esac # Run regular gccgcc -static "$@" || exit $? case "$iscc" in1)	exit 0esac # Rename output to _outputuout="`echo $out | sed 's!.*/!&_!'`"mv $out $uout # Write new output file cat >$out <<EOF#!/bin/shcase "\$VXNATIVE" in1)	exec "$uout" "\$@"	;;*)	exec vxlinux "$uout" "\$@"	;;esacEOFchmod +x $outexit 0