2016-05-02 21:15:29 +02:00
|
|
|
#!/usr/bin/env bash
|
2016-04-30 00:35:52 +02:00
|
|
|
|
2016-05-01 19:01:28 +02:00
|
|
|
# Source this file and call `tail -f fingers.log` when you don't know WTF is
|
|
|
|
# going on.
|
|
|
|
|
|
|
|
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
2016-04-30 00:35:52 +02:00
|
|
|
|
2016-05-08 17:06:02 +02:00
|
|
|
function current_ms() {
|
|
|
|
echo $(($(date +%s%N)/1000000))
|
|
|
|
}
|
|
|
|
|
2016-04-30 00:35:52 +02:00
|
|
|
function log() {
|
2016-05-02 21:15:29 +02:00
|
|
|
echo "$1" >> "$CURRENT_DIR/../fingers.log"
|
2016-04-30 00:35:52 +02:00
|
|
|
}
|
2020-01-03 18:55:30 +01:00
|
|
|
|
|
|
|
function log_array() {
|
|
|
|
declare -a arg_arr=(${!1})
|
|
|
|
|
|
|
|
for i in "${arg_arr[@]}"
|
|
|
|
do
|
|
|
|
log "> $i"
|
|
|
|
done
|
|
|
|
}
|