diff options
author | davidovski <david@davidovski.xyz> | 2021-11-20 17:25:45 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2021-11-20 17:25:45 +0000 |
commit | a1629e15ec3bc248b0fc44b92d983b81375d3a50 (patch) | |
tree | 3c01344cd901c0c3035cd9e8d187f07449c85dd7 | |
parent | a0a9647da2375251ff8f83e82a406b3fe185bcbb (diff) |
added repos index
-rwxr-xr-x | build-repo.sh | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/build-repo.sh b/build-repo.sh index dbff02d..6d95b92 100755 --- a/build-repo.sh +++ b/build-repo.sh @@ -9,6 +9,12 @@ fetch () { } build () { + REPOS_INDEX=dist/repo/index.html + rm $REPOS_INDEX + + echo-head "repo" >> $REPOS_INDEX + echo "<h1>repo</h1>" >> $REPOS_INDEX + for REPO in $(du -h xipkgs/repo/* | awk '{print $2}' | sort -r ); do REPO_NAME=$(echo $REPO | cut -d"/" -f2-) @@ -32,16 +38,28 @@ build () { generate-package-list add-additional + + echo "<a href='/$REPO_NAME'><h2>$REPO_NAME</h2><a> " >> $REPOS_INDEX + + + echo "<p>package count: <strong>$(ls dist/$REPO_NAME/*.xipkg | wc -l)</strong></p>" >> $REPOS_INDEX done; + + echo "" } -start-index () { +echo-head () { echo "<html> <head> - <title>packages for $1</title> + <title>$1</title> <style>$(cat style.css)</style> - </head> - <body> + </head> + <body>" +} + +start-index() { + echo-head "packages for $1" > $2 + echo " <h1>Packages in <a href='../'>$1</a></h1> <table> <tr> @@ -52,7 +70,7 @@ start-index () { <td>file</td> <td>info file</td> </tr> - " > $2 + " >> $2 } extend-index () { @@ -119,7 +137,8 @@ add-additional () { # add key for whole repo mkdir dist/keychain - cp keychain/xi.pub dist/keychain/ + cp keychain/keys.list dist/keychain/ + cp keychain/*.pub dist/keychain/ } clean () { |