...
 
Commits (2)
#!/usr/bin/env bash
#!/usr/local/bin/bash
declare -A attachments_list
input_file=''
......@@ -11,6 +11,16 @@ vault_attachments_folder=''
vault_path=''
vault_subfolder=''
check_bash_version() {
local min_ver="4.0"
if [ "$(printf '%s\n' "$min_ver" "$BASH_VERSION" | sort -V | head -n1)" != "$min_ver" ]; then
echo "ERROR: requires bash $min_ver+, exiting"
exit 1
fi
}
check_bash_version
build_usable_basename() {
local hsh=$(sha1sum "$fn" | cut -c 1-8 | tr '[:upper:]' '[:lower:]')
......@@ -65,7 +75,7 @@ print_debug_output() {
print_usage_and_exit() {
cat "$(dirname "$0")/add-obsidian-note.md"
exit 2
exit
}
......