summaryrefslogtreecommitdiff
path: root/osi-extract
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-08-11 17:15:13 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-08-11 17:15:13 -0400
commit33038503143e7f5e3e3b48c0aa4dadd142c229e6 (patch)
tree3416e2dd11c20de782ddb0c6a1fe329392b4bf15 /osi-extract
parentae58deb68af6c7f147b7e96b27444599e0f364bc (diff)
more
Diffstat (limited to 'osi-extract')
-rwxr-xr-xosi-extract4
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"
}