Some minor updates to the site and search API.
This commit is contained in:
parent
43d97e41e1
commit
1428652b84
5 changed files with 86 additions and 4 deletions
|
|
@ -89,7 +89,22 @@ else
|
|||
[[ "${ITEM/$STORAGE_PREFIX}" == "$QS_p" ]] && continue
|
||||
|
||||
# List the item.
|
||||
printf "%s\\n" "${ITEM/$STORAGE_PREFIX}"
|
||||
if [[ -f "$ITEM" ]]; then
|
||||
# File type.
|
||||
printf "%s %s\\n" "f" "${ITEM/$STORAGE_PREFIX}"
|
||||
elif [[ -d "$ITEM" ]]; then
|
||||
# Directory type.
|
||||
printf "%s %s\\n" "d" "${ITEM/$STORAGE_PREFIX}"
|
||||
elif [[ -L "$ITEM" ]]; then
|
||||
# Symbolic link type.
|
||||
printf "%s %s\\n" "l" "${ITEM/$STORAGE_PREFIX}"
|
||||
elif [[ -e "$ITEM" ]]; then
|
||||
# Other type.
|
||||
printf "%s %s\\n" "o" "${ITEM/$STORAGE_PREFIX}"
|
||||
else
|
||||
# Stale file in database.
|
||||
printf "%s %s\\n" "?" "${ITEM/$STORAGE_PREFIX}"
|
||||
fi
|
||||
|
||||
(( I++ ))
|
||||
done < <(locate -A -d "$LOCATE_DB" -i -l "$(( QS_l * 2 ))" "$STORAGE_PREFIX/${QS_p##/}" $QS_q | sort)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue