diff --git a/kde-tde/tde_device_conversion b/kde-tde/tde_device_conversion index 697c348..f648ab2 100755 --- a/kde-tde/tde_device_conversion +++ b/kde-tde/tde_device_conversion @@ -11,26 +11,26 @@ WORKDIR=$PWD function rename_files { - echo '#!/bin/bash' > /tmp/rename_mime_files - echo '' >> /tmp/rename_mime_files - echo 'cd $1' >> /tmp/rename_mime_files - echo '' >> /tmp/rename_mime_files - echo 'BASEDIR=${PWD##*/}' >> /tmp/rename_mime_files - echo "ORIGNAME='$1'" >> /tmp/rename_mime_files - echo "NEWNAME='$2'" >> /tmp/rename_mime_files - echo '' >> /tmp/rename_mime_files - echo 'if [[ "$BASEDIR" == ".git" ]]; then' >> /tmp/rename_mime_files - echo ' echo "Ignoring .git directory"' >> /tmp/rename_mime_files - echo ' exit 0' >> /tmp/rename_mime_files - echo 'fi' >> /tmp/rename_mime_files - echo '' >> /tmp/rename_mime_files - echo 'ls -d * | sed "s/\(.*\)mime-$ORIGNAME\.png\(.*\)$/git mv \"&\" \"\1mime-$NEWNAME\.png\2\"/" | grep mv | sh' >> /tmp/rename_mime_files - echo 'ls -d * | sed "s/$ORIGNAME\.png\(.*\)$/git mv \"&\" \"$NEWNAME\.png\1\"/" | grep mv | sh' >> /tmp/rename_mime_files - chmod 755 /tmp/rename_mime_files + echo '#!/bin/bash' > /tmp/rename_device_files + echo '' >> /tmp/rename_device_files + echo 'cd $1' >> /tmp/rename_device_files + echo '' >> /tmp/rename_device_files + echo 'BASEDIR=${PWD##*/}' >> /tmp/rename_device_files + echo "ORIGNAME='$1'" >> /tmp/rename_device_files + echo "NEWNAME='$2'" >> /tmp/rename_device_files + echo '' >> /tmp/rename_device_files + echo 'if [[ "$BASEDIR" == ".git" ]]; then' >> /tmp/rename_device_files + echo ' echo "Ignoring .git directory"' >> /tmp/rename_device_files + echo ' exit 0' >> /tmp/rename_device_files + echo 'fi' >> /tmp/rename_device_files + echo '' >> /tmp/rename_device_files + echo 'ls -d * | sed "s/\(.*\)device-$ORIGNAME\.png\(.*\)$/git mv \"&\" \"\1device-$NEWNAME\.png\2\"/" | grep mv | sh' >> /tmp/rename_device_files + echo 'ls -d * | sed "s/$ORIGNAME\.png\(.*\)$/git mv \"&\" \"$NEWNAME\.png\1\"/" | grep mv | sh' >> /tmp/rename_device_files + chmod 755 /tmp/rename_device_files - find ./ -type d -exec /tmp/rename_mime_files {} \; &> /dev/null + find ./ -type d -exec /tmp/rename_device_files {} \; &> /dev/null - rm /tmp/rename_mime_files + rm /tmp/rename_device_files } function convert_files {