Skip to content

Instantly share code, notes, and snippets.

@GwynethLlewelyn
Last active September 17, 2025 07:32
Show Gist options
  • Select an option

  • Save GwynethLlewelyn/a7bc7f47dbf37127e9f157c347bc495a to your computer and use it in GitHub Desktop.

Select an option

Save GwynethLlewelyn/a7bc7f47dbf37127e9f157c347bc495a to your computer and use it in GitHub Desktop.

Revisions

  1. GwynethLlewelyn revised this gist Sep 16, 2025. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion extract-uuid.sh
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,16 @@
    #!/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.
    # (cc) 2024–2025 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.
    #
    # `ug` below is `ugrep`, a `grep` replacement, which you can get from here: <https://ugrep.com/>
    # All others should be standard on any Un*x system.
    # `curl` is usually available on all systems as well, but, if not, you can grab it from <https://curl.se/>
    #
    # The commands below have only been tested under `bash` 5.2.* but should work on most shells (not tested)
    #
    LLURL=http://asset-cdn.glb.agni.lindenlab.com/?texture_id=
    for uuid in $( ug -U -P --format='%1%~' --regexp '<uuid>([a-f0-9\-]+)</uuid>' -- *.xml | sort | uniq ) ;
    do
  2. GwynethLlewelyn created this gist Aug 20, 2024.
    36 changes: 36 additions & 0 deletions extract-uuid.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    #!/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 '<uuid>([a-f0-9\-]+)</uuid>' -- *.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