Skip to content

Commit 39ab7f3

Browse files
committed
Merge pull request hestiacp#533 from ionescu-bogdan/patch-4
Update v-list-web-templates
2 parents cd0dbb4 + 73f0b69 commit 39ab7f3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/v-list-web-templates

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ source $VESTA/conf/vesta.conf
1818

1919
# Json function
2020
json_list_wtpl() {
21-
templates=$(ls -t $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/)
22-
templates=$(echo "$templates" | grep "\.tpl" |cut -f 1 -d '.' )
21+
templates=$(ls -v $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/)
22+
templates=$(echo "$templates" | grep '\.tpl' | sed 's/\.tpl$//')
2323
t_counter=$(echo "$templates" | wc -w)
2424
i=1
2525
echo '['
@@ -36,8 +36,8 @@ json_list_wtpl() {
3636

3737
# Shell function
3838
shell_list_wtpl() {
39-
templates=$(ls -t $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/)
40-
templates=$(echo "$templates" | grep "\.tpl" |cut -f 1 -d '.' )
39+
templates=$(ls -v $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/)
40+
templates=$(echo "$templates" | grep '\.tpl' | sed 's/\.tpl$//')
4141
if [ -z "$nohead" ]; then
4242
echo "Templates"
4343
echo "----------"

0 commit comments

Comments
 (0)