Only do command checks on Darwin.

master
Icedream 2018-07-26 11:56:01 +02:00
parent dcfbdbb14c
commit 2100cbdf1f
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
2 changed files with 10 additions and 6 deletions

View File

@ -1,8 +1,10 @@
#!/bin/sh -e
CUT="gcut"
if ! command -v "${CUT}" >/dev/null 2>&1; then
CUT="cut"
if [ "$(uname -s)" = "Darwin" ]; then
CUT="gcut"
if ! command -v "${CUT}" >/dev/null 2>&1; then
CUT="cut"
fi
fi
file_changed() {

View File

@ -1,8 +1,10 @@
#!/bin/sh -e
READLINK="greadlink"
if ! command -v "${READLINK}" >/dev/null 2>&1; then
READLINK="readlink"
if [ "$(uname -s)" = "Darwin" ]; then
READLINK="greadlink"
if ! command -v "${READLINK}" >/dev/null 2>&1; then
READLINK="readlink"
fi
fi
install_files() {