31 lines
535 B
Text
31 lines
535 B
Text
|
#!/bin/sh
|
||
|
# 2013 Steven Armstrong (steven-cdist armstrong.cc)
|
||
|
|
||
|
destination="/$__object_id"
|
||
|
|
||
|
# nothing to work with, nothing we could do
|
||
|
[ -e "$destination" ] || exit 0
|
||
|
|
||
|
os=$("$__explorer/os")
|
||
|
case "$os" in
|
||
|
"freebsd")
|
||
|
# FIXME: should be something like this based on man page, but can not test
|
||
|
stat -f "type: %ST
|
||
|
owner: %Du %Su
|
||
|
group: %Dg %Sg
|
||
|
mode: %Op %Sp
|
||
|
size: %Dz
|
||
|
links: %Dl
|
||
|
" "$destination"
|
||
|
;;
|
||
|
*)
|
||
|
stat --printf="type: %F
|
||
|
owner: %u %U
|
||
|
group: %g %G
|
||
|
mode: %a %A
|
||
|
size: %s
|
||
|
links: %h
|
||
|
" "$destination"
|
||
|
;;
|
||
|
esac
|