From: Chris Koeritz Date: Sat, 16 Feb 2013 19:26:24 +0000 (-0500) Subject: moving this to a better name in a better location. X-Git-Tag: 2.140.90~1106 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=8bca8b4404ce2236359f100b97b1d10abb1b94bb;p=feisty_meow.git moving this to a better name in a better location. --- diff --git a/scripts/files/remove_bracket_id.sh b/scripts/files/remove_bracket_id.sh deleted file mode 100644 index 66b5a61b..00000000 --- a/scripts/files/remove_bracket_id.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# a handy script for fixing file names imported using second inventory. -# the names have a hideous long guid as part of them by default. - -if [ $# -lt 1 ]; then - echo "This script requires one or more file names whose names should be fixed." - echo "Any GUID junk embedded in the name within brackets will be removed." - exit 1 -fi - -while [ $# -gt 0 ]; do - file="$1"; shift - newname="$(echo "$file" | sed -e 's/\[[a-z0-9A-Z-]*\]//g' | tr ' ' '_' | tr -d "\~'" | sed -e 's/\([0-9]\)_\./\1./g' )" - if [ "$file" != "$newname" ]; then - # we've effected a name change, so let's actually do it. - echo "moving '$file' => '$newname' " - mv "$file" "$newname" - fi -done - diff --git a/scripts/opensim/remove_lsl_guids.sh b/scripts/opensim/remove_lsl_guids.sh new file mode 100644 index 00000000..66b5a61b --- /dev/null +++ b/scripts/opensim/remove_lsl_guids.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# a handy script for fixing file names imported using second inventory. +# the names have a hideous long guid as part of them by default. + +if [ $# -lt 1 ]; then + echo "This script requires one or more file names whose names should be fixed." + echo "Any GUID junk embedded in the name within brackets will be removed." + exit 1 +fi + +while [ $# -gt 0 ]; do + file="$1"; shift + newname="$(echo "$file" | sed -e 's/\[[a-z0-9A-Z-]*\]//g' | tr ' ' '_' | tr -d "\~'" | sed -e 's/\([0-9]\)_\./\1./g' )" + if [ "$file" != "$newname" ]; then + # we've effected a name change, so let's actually do it. + echo "moving '$file' => '$newname' " + mv "$file" "$newname" + fi +done +