mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-25 13:14:12 +00:00
Now reads labels from first line of label files
Instead of reading the name of the file
This commit is contained in:
@@ -98,7 +98,7 @@ archLabels=( $(grep "\$(arch)" ${pathToLabels}/* | awk '{print $1}' | sed -E 's/
|
|||||||
echo "${BLUE}Labels with \"\$(arch)\" call:${NC}\n${archLabels}\n"
|
echo "${BLUE}Labels with \"\$(arch)\" call:${NC}\n${archLabels}\n"
|
||||||
|
|
||||||
if [[ $# -eq 0 ]]; then
|
if [[ $# -eq 0 ]]; then
|
||||||
allLabels=( $(ls ${pathToLabels}/*.sh | sed -E 's/.*\/([a-z0-9\_-]*)\..*/\1/g') )
|
allLabels=( $(grep -h -E '^([a-z0-9\_-]*)(\)|\|\\)$' ${pathToLabels}/*.sh | tr -d ')|\\' | sort) )
|
||||||
else
|
else
|
||||||
allLabels=( ${=@} )
|
allLabels=( ${=@} )
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user