File tree Expand file tree Collapse file tree 1 file changed +9
-17
lines changed
Expand file tree Collapse file tree 1 file changed +9
-17
lines changed Original file line number Diff line number Diff line change 99 tarball=$(find . -name "*.tgz")
1010 tarballFilePaths=$(tar -tf $tarball)
1111
12- for filePath in $tarballFilePaths
12+ while read -r filePath
1313 do
1414 case $filePath in
1515 *.meta)
1616 metaFilePath=$filePath
1717 found=false
1818 regularFilePath=${metaFilePath%.meta}
19- for otherFilePath in $tarballFilePaths
19+ while read -r otherFilePath
2020 do
2121 case $otherFilePath in
2222 $regularFilePath/* | $regularFilePath*) # folder or file
23- if [ $metaFilePath != $otherFilePath ]
23+ if [ " $metaFilePath" != " $otherFilePath" ]
2424 then
2525 found=true
2626 break
2727 fi;;
2828 esac
29- done
29+ done <<< "$tarballFilePaths"
3030 if [ "$found" = false ]
3131 then
32- echo "Missing file for Unity meta file '$metaFilePath'." >&2
32+ echo "Missing file for Unity meta file '${ metaFilePath#"package/"} '." >&2
3333 fi;;
34- esac
35- done
36-
37- for filePath in $tarballFilePaths
38- do
39- case $filePath in
40- *.meta)
41- ;;
4234 *)
4335 regularFilePath=$filePath
4436 found=false
45- for otherFilePath in $tarballFilePaths
37+ while read -r otherFilePath
4638 do
4739 case $otherFilePath in
4840 $regularFilePath.meta)
4941 found=true
5042 break;;
5143 esac
52- done
44+ done <<< "$tarballFilePaths"
5345 if [ "$found" = false ]
5446 then
55- echo "Missing Unity meta file for file '$regularFilePath'." >&2
47+ echo "Missing Unity meta file for file '${ regularFilePath#"package/"} '." >&2
5648 fi;;
5749 esac
58- done
50+ done <<< "$tarballFilePaths"
5951
6052 rm -f $tarball
6153 displayName: Check Unity .meta files
You can’t perform that action at this time.
0 commit comments