#!/bin/sh # Grab all possible textures from LL's own CDN, referenced by UUID from LLSD backups. # Usage: Go to where your LLSD XML files are stored; run script. Wait a few seconds. Done! # (cc) 2024 by Gwyneth Llewelyn. Some rights reserved. # Distributed under the MIT license: https://gwyneth-llewelyn.mit-license.org # Second Life® is a registered trademark of Linden Lab. No copyright infringement is intended. # LLURL=http://asset-cdn.glb.agni.lindenlab.com/?texture_id= for uuid in $( ug -U -P --format='%1%~' --regexp '([a-f0-9\-]+)' -- *.xml | sort | uniq ) ; do if [ -f $uuid ]; then echo $uuid "(skipped) 🆗" continue fi assetdir=$( echo $uuid | cut -b 1 ); if [ -f ~/Library/Caches/SecondLife/assets/$assetdir/$uuid.asset ]; then cp ~/Library/Caches/SecondLife/assets/$assetdir/$uuid.asset $uuid if [ $? -eq 0 ]; then echo $uuid "(from cache) ✅" else echo "⚠️ Copy \"~/Library/Caches/SecondLife/assets/$assetdir/$uuid.asset to $uuid\" failed with error $? ⚠️" fi else # Attempt to retrieve it remotely curl -o $uuid $LLURL$uuid if [ $? -eq 0 ]; then echo $uuid "(from direct download) ✅" else echo $uuid ❌ fi fi done