mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
init.sh: Use readlink in pybin()
Use realpath only as a fallback. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -144,6 +144,18 @@ singletree()
|
||||
return 1
|
||||
}
|
||||
|
||||
findpath()
|
||||
{
|
||||
[ $# -gt 0 ] || err "findpath: No arguments provided"
|
||||
while [ $# -gt 0 ]; do
|
||||
found="`readlink -f "$1" 2>/dev/null`" || return 1; :
|
||||
[ -n "$found" ] || found="`realpath "$1" 2>/dev/null`" || \
|
||||
return 1; :
|
||||
printf "%s\n" "$found"
|
||||
shift 1
|
||||
done
|
||||
}
|
||||
|
||||
fx_()
|
||||
{
|
||||
fd="`mktemp`" && x_ rm -f "$fd" && x_ touch "$fd"
|
||||
|
||||
Reference in New Issue
Block a user