File: custom_output.sh

package info (click to toggle)
pcl 1.15.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 143,128 kB
  • sloc: cpp: 520,234; xml: 28,792; ansic: 8,212; python: 334; lisp: 93; sh: 49; makefile: 30
file content (17 lines) | stat: -rwxr-xr-x 424 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# shell script invoked with the following arguments
# $(CXX) $(CXX_DEFINES) $(CXX_FLAGS) -o OBJECT_FILE -c SOURCE_FILE

# extract parameters
SOURCE_FILE="${@: -1:1}"
OBJECT_FILE="${@: -3:1}"

# invoke compiler
TIME_BEFORE=`date +%s%N | cut -b1-13`
"$@"
TIME_AFTER=`date +%s%N | cut -b1-13`
TIME=$(($TIME_AFTER-$TIME_BEFORE))

echo " *** Built object `basename \"$OBJECT_FILE\"` from $SOURCE_FILE in $TIME ms."