summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0f10a89)
The version in the last commit has a bug handling multiple files in
is_live_path, the fix introduces file_pattern_matches() which checks for $1
only. So even if there are multiple files matching the pattern only the first
one will go into the [ -e ... ] expression.
- DIRECTORY="${1}"
-
- if [ -d "${DIRECTORY}"/"${LIVE_MEDIA_PATH}" ]
- then
- for FILESYSTEM in squashfs ext2 ext3 ext4 xfs dir jffs2
- do
- if [ -e "${DIRECTORY}/${LIVE_MEDIA_PATH}/"*".${FILESYSTEM}" ]
- then
- return 0
- fi
- done
- fi
+is_live_path()
+{
+ DIRECTORY="${1}/${LIVE_MEDIA_PATH}"
+ for FILESYSTEM in squashfs ext2 ext3 ext4 xfs dir jffs
+ do
+ if file_pattern_matches "${DIRECTORY}/"*.${FILESYSTEM}
+ then
+ return 0
+ fi
+ done