diff --git a/install.sh b/install.sh index 51a51ff..352bdac 100755 --- a/install.sh +++ b/install.sh @@ -1,7 +1,7 @@ #!/bin/bash CURDIR=$PWD -REQUIRED_PKGS=(file git) +REQUIRED_PKGS=(file git bc) function usage() { echo 'usage: --host | --containers | --full | --one-container ' diff --git a/tools/timing b/tools/timing new file mode 100755 index 0000000..32ba5ac --- /dev/null +++ b/tools/timing @@ -0,0 +1,13 @@ +#!/bin/bash + +echo >&2 "time elapsed in seconds..." +START=$(date +%s.%N) +# do something ####################### + +$@ + +####################################### +END=$(date +%s.%N) + +DIFF=$(echo "scale=2; (${END} - ${START}) / 1" | bc) +echo "${DIFF}"