Просмотр исходного кода

Minor fixes to v-list-sys-themes

Kristan Kenney 6 лет назад
Родитель
Сommit
d808cb243f
1 измененных файлов с 6 добавлено и 3 удалено
  1. 6 3
      bin/v-list-sys-themes

+ 6 - 3
bin/v-list-sys-themes

@@ -82,9 +82,12 @@ csv_list() {
 
 # Parsing templates
 themes=$(ls -v $HESTIA_THEMES/)
-themes_custom=$(ls -v $HESTIA_THEMES_CUSTOM/)
-themes=$(echo "$themes" |grep '\.css' |sed 's/\.css$//')
-themes_custom=$(echo "$themes_custom" |grep '\.css' |sed 's/\.css$//')
+themes=$(echo "$themes" | grep '\.css' | sed 's/\.css$//')
+
+if [ ! -z "$HESTIA_THEMES_CUSTOM" ]; then
+    themes_custom=$(ls -v $HESTIA_THEMES_CUSTOM/)
+    themes_custom=$(echo "$themes_custom" | grep '\.css' | sed 's/\.css$//')
+fi
 
 # Listing data
 case $format in