mirror of
https://github.com/sharkdp/bat
synced 2024-11-15 00:12:57 +00:00
60e00d49a9
The macOS version of mktemp does not recognize the --suffix option. Using pure -d should work since, it seems [1], macOS 10.11 however. So to make the script work on macOS, stop using the --suffix option. The downside is of course that the temporary dir will have an anonymous name, but I see no risk of confusion given how short-lived the usage of the dir is, and given the context it is used. [1] https://unix.stackexchange.com/questions/30091/fix-or-alternative-for-mktemp-in-os-x
16 lines
360 B
Bash
Executable File
Vendored
16 lines
360 B
Bash
Executable File
Vendored
#!/usr/bin/env bash
|
|
|
|
set -eou pipefail
|
|
|
|
script_directory="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
|
|
output_directory=$(mktemp -d)
|
|
|
|
"$script_directory"/create_highlighted_versions.py --output="$output_directory"
|
|
|
|
echo
|
|
|
|
"$script_directory"/compare_highlighted_versions.py \
|
|
"$script_directory/highlighted" \
|
|
"$output_directory"
|