diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-08-11 17:15:13 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-08-11 17:15:13 -0400 |
commit | 33038503143e7f5e3e3b48c0aa4dadd142c229e6 (patch) | |
tree | 3416e2dd11c20de782ddb0c6a1fe329392b4bf15 /osi-extract | |
parent | ae58deb68af6c7f147b7e96b27444599e0f364bc (diff) |
more
Diffstat (limited to 'osi-extract')
-rwxr-xr-x | osi-extract | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/osi-extract b/osi-extract index 0030f80..77ef189 100755 --- a/osi-extract +++ b/osi-extract @@ -3,14 +3,14 @@ { set -euE source "${BASH_SOURCE[0]%/*}/lib/osi.sh" + become_sudo "$@" arg_image=$1 arg_src=$(realpath -ms -- "$2") arg_dst=$3 - needs_sudo mountpoint=$(mktemp -dt -- "${0##*/}.XXXXXXXXXX") trap "rmdir -- ${mountpoint@Q}" EXIT - with_mount "$arg_image" "$mountpoint" sudo -u "#${SUDI_UID}" -- cp -aT -- "$mountpoint/$src" "$dst" + with_mount "$arg_image" "$mountpoint" sudo -u "#${SUDO_UID}" -- cp -aT -- "$mountpoint/$src" "$dst" } |