mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-25 16:40:07 -07:00
kiss: readlink(), run in subshell
This commit is contained in:
parent
881c6114b9
commit
f10cdb1938
5
kiss
5
kiss
@ -145,7 +145,7 @@ decompress() {
|
||||
esac < "$1"
|
||||
}
|
||||
|
||||
readlink() {
|
||||
readlink() (
|
||||
# This is a 'readlink' utility written with POSIX utilities.
|
||||
# 'ls' is used to obtain the target of the symlink.
|
||||
#
|
||||
@ -186,9 +186,8 @@ readlink() {
|
||||
# where a file may include ' -> ' in its name.
|
||||
[ -e "$target" ] || target=$PWD/${1##*/}
|
||||
|
||||
cd - >/dev/null
|
||||
printf '%s\n' "$target"
|
||||
}
|
||||
)
|
||||
|
||||
sha256sum() {
|
||||
# This is an implementation of 'sha256sum' using openssl/libressl.
|
||||
|
Loading…
Reference in New Issue
Block a user