diff --git a/home/bin/update-profile b/home/bin/update-profile index 972bd42..c9badab 100755 --- a/home/bin/update-profile +++ b/home/bin/update-profile @@ -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() { diff --git a/install.sh b/install.sh index 393edc5..8f807ed 100755 --- a/install.sh +++ b/install.sh @@ -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() {