Skip to content

Commit 8abde45

Browse files
committed
Upload make_site_md.sh
1 parent 48f871f commit 8abde45

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/output
1+
/.output

make_site_md.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
#-----------------------------------------------------
3+
# 把目录下所有 README.md 内容转换为 page 格式内容
4+
#
5+
# https://github.com/zhengxiaopeng/android-dev-bookmarks/blob/master/make_site_md.sh
6+
#
7+
# Rocko(rocko.xyz)
8+
#-----------------------------------------------------
9+
10+
fileList=`ls -d */|sed 's|[/]||g'`
11+
output=".output/"
12+
rm -rf ${output}
13+
mkdir ${output}
14+
15+
for file in ${fileList}
16+
do
17+
echo ${file}
18+
mkdir ${output}${file}
19+
cp ${file}"/README.md" ${output}${file}"/index.md"
20+
done

0 commit comments

Comments
 (0)