mirror of
https://github.com/levogevo/ffmpeg-builder.git
synced 2026-01-15 19:06:17 +00:00
is_root_owned
This commit is contained in:
@@ -66,6 +66,21 @@ echo_if_fail() {
|
||||
return ${retval}
|
||||
}
|
||||
|
||||
is_root_owned() {
|
||||
local path=$1
|
||||
local uid
|
||||
|
||||
if stat --version >/dev/null 2>&1; then
|
||||
# GNU coreutils (Linux)
|
||||
uid=$(stat -c '%u' "$path")
|
||||
else
|
||||
# BSD/macOS
|
||||
uid=$(stat -f '%u' "$path")
|
||||
fi
|
||||
|
||||
test "$uid" -eq 0
|
||||
}
|
||||
|
||||
dump_arr() {
|
||||
arr_name="$1"
|
||||
declare -n arr
|
||||
|
||||
Reference in New Issue
Block a user