Skip to content

Commit 8297871

Browse files
committed
feat query.sh: add some wip things to -query
1 parent f94face commit 8297871

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

scripts/commands/extensions/query.sh

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,33 @@ Command() {
1313

1414
eval "$(parse_yaml .blueprint/tmp/"${n}"/conf.yml conf_)"
1515

16+
# Basic extension information
1617
echo -e \
17-
"\x1b[1m$conf_info_name \033[0;2m(nebula.blueprint)"\
18-
"\n$conf_info_description\033[0m"
18+
"\n\x1b[1m$conf_info_name $conf_info_version \033[0;2m(${conf_info_identifier})"\
19+
"\n$conf_info_description\033[0m\n"
20+
21+
# Made for version
22+
if [[ "$VERSION" == "$conf_info_target" ]]; then
23+
echo -e \
24+
"\x1b[32;1m Made for $VERSION\033[0m"
25+
else
26+
echo -e \
27+
"\x1b[33;1m Made for $conf_info_target\033[0m"
28+
fi
29+
30+
# Check for scripts
31+
# NOTE: Export scripts are excluded from this warning, as they serve a developer-only purpose.
32+
if [[ -f ".blueprint/tmp/${n}/$conf_data_directory/install.sh" ]] ||
33+
[[ -f ".blueprint/tmp/${n}/$conf_data_directory/update.sh" ]] ||
34+
[[ -f ".blueprint/tmp/${n}/$conf_data_directory/remove.sh" ]]; then
35+
echo -e \
36+
"\x1b[31;1m Utilizes extension scripts, which can be a safety risk. Extensions with installation scripts can cause conflicts and break other extensions. Learn more at \033[0;2mblueprint.zip/docs/?page=documentation/scripts\x1b[0;31;1m.\033[0m"
37+
fi
1938

2039
rm -R ".blueprint/tmp/$n"
2140
mkdir -p .blueprint/tmp
2241

42+
echo;
43+
2344
exit 0
2445
}

0 commit comments

Comments
 (0)