瀏覽代碼

Merge pull request #23422 from thaJeztah/skip-hidden-files

deb: skip hidden files when generating indexes
Vincent Demeester 9 年之前
父節點
當前提交
cebdb89998
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      hack/make/generate-index-listing

+ 2 - 2
hack/make/generate-index-listing

@@ -40,8 +40,8 @@ create_index() {
 	# change IFS locally within subshell so the for loop saves line correctly to L var
 	IFS=$'\n';
 
-	# pretty sweet, will mimick the normal apache output
-	for L in $(find -L . -mount -depth -maxdepth 1 -type f ! -name 'index' -printf "<a href=\"%f\">%f|@_@%Td-%Tb-%TY %Tk:%TM  @%f@\n"|sort|column -t -s '|' | sed 's,\([\ ]\+\)@_@,</a>\1,g');
+	# pretty sweet, will mimick the normal apache output. skipping "index" and hidden files
+	for L in $(find -L . -mount -depth -maxdepth 1 -type f ! -name 'index' ! -name '.*' -prune -printf "<a href=\"%f\">%f|@_@%Td-%Tb-%TY %Tk:%TM  @%f@\n"|sort|column -t -s '|' | sed 's,\([\ ]\+\)@_@,</a>\1,g');
 	do
 		# file
 		F=$(sed -e 's,^.*@\([^@]\+\)@.*$,\1,g'<<<"$L");