# File library script if [ -z "${__file_sh_loaded}" ] then __file_sh_loaded=yes # Make sure the listed files have only one hardlink onelink() { while [ -n "${1}" ] do if [ -f "${1}" -a "$(stat -f '%l' "${1}")" -gt 1 ] then tmp="$(mktemp "${1}")" cp -p "${1}" "${tmp}" && mv "${tmp}" "${1}" || return 1 fi shift done } fi