summaryrefslogtreecommitdiff
path: root/build-repo.sh
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2021-11-20 17:25:45 +0000
committerdavidovski <david@davidovski.xyz>2021-11-20 17:25:45 +0000
commita1629e15ec3bc248b0fc44b92d983b81375d3a50 (patch)
tree3c01344cd901c0c3035cd9e8d187f07449c85dd7 /build-repo.sh
parenta0a9647da2375251ff8f83e82a406b3fe185bcbb (diff)
added repos index
Diffstat (limited to 'build-repo.sh')
-rwxr-xr-xbuild-repo.sh31
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 () {