diff options
author | Leah Rowe <leah@libreboot.org> | 2025-05-14 16:59:59 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-05-14 16:59:59 +0100 |
commit | e62886dedae26f49822350daeb7cfe83bb9a3931 (patch) | |
tree | 9e21a47a26d03cb3cbdd2d2604efad55a00ac4d7 | |
parent | d9ed03f9ea595f8e376021f5560625908b4069d9 (diff) |
get.sh: simplify try_copy()
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r-- | include/get.sh | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/get.sh b/include/get.sh index b3d17d7e..69cc1a4a 100644 --- a/include/get.sh +++ b/include/get.sh @@ -127,10 +127,8 @@ try_curl() try_copy() { - [ -L "$2" ] && printf "dl %s %s %s %s: '%s' is a symlink\n" \ - "$4" "$5" "$6" "$7" "$2" 1>&2 && return 1 - [ ! -f "$2" ] && printf "dl %s %s %s %s: '%s' not a file\n" \ - "$4" "$5" "$6" "$7" "$2" 1>&2 && return 1 + [ -L "$2" ] && printf "symlink %s (try_cp %s)\n" "$2" "$*" && return 1 + [ ! -f "$2" ] && "no such file %s (try_cp %s)\n" "$2" "$*" && return 1 cp "$2" "$1" || return 1; : } |