summaryrefslogtreecommitdiff
path: root/src/lib/get_type
blob: 9f04b53c878f00480a6c09212a3231ae127883ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
get_type() {
	FILE="$1"
	CATEGORY="$(echo "$FILE" | grep -Eo "\.[0-9].?\.html$")"

	if [ -n "$CATEGORY" ]; then
		case "$CATEGORY" in
			.1*) echo "Command"  ;;
			.2*) echo "Service"  ;;
			.3*) echo "Function" ;;
			*)  echo "Object"   ;;
		esac
	fi
}