unity 不能识别 atlas ,需要将目录下所有 .atlas 改成 .atlas.txt

    1. #!/bin/sh
    2. function rename_atlas() {
    3. for file in `ls $1`
    4. do
    5. if test -f $1"/"$file
    6. then
    7. if [ "${file##*.}"x = "atlas"x ];then
    8. mv $1"/"$file $1"/"$file.txt
    9. fi
    10. else
    11. rename_atlas $1"/"$file
    12. fi
    13. done
    14. }
    15. rename_atlas $1