pkgsrc / update.sh
pg83's picture
regular update
a20fe98
raw
history blame
342 Bytes
#!/usr/bin/env sh
set -xue
minio-client ls minio/cas | grep STA | sed -e 's|.* ||' | sort | grep -v '^$' > 1
find cas/ -type f | sed -e 's|.*/||' | grep -v gitattributes | sort > 2
diff 2 1 | grep '^+' | grep -v ' ' | tr -d '+' | while read l; do
minio-client get minio/cas/${l} _
mv _ cas/$(echo ${l} | cut -c1-2)/${l}
done
rm 1 2