mirror of
https://github.com/hanzoai/Detox.git
synced 2026-09-24 16:55:12 +00:00
22 lines
344 B
Bash
Executable File
22 lines
344 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
set +x
|
|
|
|
green='\033[0;32m'
|
|
yellow='\033[33m'
|
|
nocolor='\033[0m'
|
|
|
|
run_f () {
|
|
cmd="${1}"
|
|
|
|
echo -e "--- \"Running command ${yellow}${cmd}${nocolor}\""
|
|
SECONDS=0
|
|
|
|
set -x
|
|
($cmd)
|
|
|
|
set +x
|
|
duration=$SECONDS
|
|
echo -e "${green}\t--> ${cmd} done in $(($duration / 60)) minutes and $(($duration % 60)) seconds ${nocolor}\n"
|
|
}
|