chore: make debug functions to toggle debug logs

pull/8/head
Adam Veldhousen 2021-10-28 20:18:15 -05:00
parent 4fbf1feb69
commit cb9589d365
Signed by: adam
GPG Key ID: 6DB29003C6DD1E4B
1 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,13 @@
#!/bin/sh
files_debug_off() {
unset FILES_DEBUG;
}
files_debug_on() {
export FILES_DEBUG=true;
}
# debug logging
files_debug_log() {
if ! [[ -z "${FILES_DEBUG}" ]]; then
@ -21,6 +29,7 @@ files_linkdir() {
find "${SOURCE}" -type f | sed "s=${SOURCE}==" | xargs -I {} ln -fs ${SOURCE}{} ${DEST}{};
fi
fi
# ln on windows pretty much only works with hardlinks it seems
#ls -lA "${SOURCE}" | grep "^-" | awk '{print $9}' | xargs -I {} ln -vfs "${SOURCE}/{}" "${DEST}/{}"
}