KIEKjes Upload System
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
541 B

#!/bin/sh
set -e
for dir; do
# disregard the 'total' header and symlink references
ls -apl "$dir" | grep -v '^total' | sed -e 's/ -> .*$//g' | while read -r mode nlinks user group size month day yearortime filename; do
statfile="$dir/$filename"
case "$filename" in
*/);;
*/*) statfile="$filename"; filename="$(basename "$filename")";;
esac
rp-make "$filename" "size=$size" "mode=$mode" "user=$user" "group=$group" "timestamp=$(date -r "$statfile" "+%Y-%m-%dT%H:%I:%S")"
done
done