Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- base_dir="."
- host="$1"
- instances_dir="${base_dir}/etc/hab/instances.d"
- controls_file="${base_dir}/${host}_controls.txt"
- host_dir="${instances_dir}/${host}"
- echo
- echo "Creating controls file at ${controls_file} for ${host_dir}"
- echo
- echo ">>>>>>>>>>>>>>>>> START"
- for install_file in $(gfind ${host_dir} -type f -printf "%P\n"); do
- real_path="${host_dir}/${install_file}"
- echo "UPD "$(stat -c %y ${real_path} | cut -d. -f1 | awk '{printf "%s_%s",$1,$2}')" "$(stat -c %s ${real_path})" /${install_file}" |tee -a ${controls_file}
- done
- echo ">>>>>>>>>>>>>>>>> END"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement