Skip to content
Snippets Groups Projects
Commit bc2c7a7a authored by Eduardo Klosowski's avatar Eduardo Klosowski
Browse files

Adicionado funções para buscar e ler o arquivo de configuração

parent 4eeb7bcb
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -35,3 +35,25 @@ run_step() {
echo "$output" | sed -r 's/(.*)/ \1/'
return 1
}
find_conf() {
path="$(realpath "$1")"
conf="$path/.commit-rules"
if [ -e "$conf" ]; then
echo "$conf"
return 0
fi
if [ "$path" == "/" ]; then
return 1
fi
find_conf "$path/.."
}
read_conf() {
sed -rn 's/^([0-9A-Za-z -_]+):\s*(.+)/\1\t\2/p' "$1"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment