summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2018-02-28 14:08:24 +0100
committertv <tv@krebsco.de>2018-02-28 14:08:31 +0100
commit019b0c4e3e37c580bbd702789d22fed561eaa37c (patch)
treef378562a3eb18058c6a8ef7083ae26ada87d77ba
parent508e2cea8b09fee3745d0c03ff8fdf64bed6c48c (diff)
main: print info before calling populate function
-rwxr-xr-xbin/populate15
1 files changed, 3 insertions, 12 deletions
diff --git a/bin/populate b/bin/populate
index addd0d5..358cb36 100755
--- a/bin/populate
+++ b/bin/populate
@@ -81,6 +81,9 @@ main() {(
key=$(echo "$source" | jq -r .key)
type=$(echo "$source" | jq -r .value.type)
conf=$(echo "$source" | jq -r .value.${type})
+
+ printf '\e[1;33m%s\e[m\n' "populate_$type $key $conf" >&2
+
populate_"$type" "$key" "$conf"
done
)}
@@ -118,8 +121,6 @@ is_local_target() {
}
populate_file() {(
- print_info populate_file "$@"
-
file_name=$1
file_path=$(echo "$2" | jq -r .path)
@@ -138,8 +139,6 @@ populate_file() {(
)}
populate_git() {(
- print_info populate_git "$@"
-
git_name=$1
git_url=$(echo "$2" | jq -r .url)
git_ref=$(echo "$2" | jq -r .ref)
@@ -185,8 +184,6 @@ populate_git() {(
)}
populate_pass() {(
- print_info populate_pass "$@"
-
pass_target_name=$1
pass_dir=$(echo "$2" | jq -r .dir)
pass_name_root=$(echo "$2" | jq -r .name)
@@ -230,8 +227,6 @@ populate_pass() {(
)}
populate_symlink() {(
- print_info populate_symlink "$@"
-
symlink_name=$1
symlink_target=$(echo "$2" | jq -r .target)
link_name=$target_path/$symlink_name
@@ -244,10 +239,6 @@ populate_symlink() {(
target_shell
)}
-print_info() {
- printf '\e[1;33m%s\e[m\n' "$*" >&2
-}
-
quote() {
printf %s "$1" | sed 's/./\\&/g'
while test $# -gt 1; do