summaryrefslogtreecommitdiffstats
path: root/scripts/gengit
diff options
context:
space:
mode:
authorsquibid <me@zacharyscheiman.com>2023-03-11 12:41:48 -0500
committersquibid <me@zacharyscheiman.com>2023-03-11 12:41:48 -0500
commit721630bec0f887e1bb2f9c5e7135b560318208c8 (patch)
treeb624f613af81e01d462e9ae400a07a08af95ef47 /scripts/gengit
parent53ba59c39dab56533ec965bfdfc28bd98ab38db0 (diff)
downloadsite-721630bec0f887e1bb2f9c5e7135b560318208c8.tar.gz
site-721630bec0f887e1bb2f9c5e7135b560318208c8.tar.bz2
site-721630bec0f887e1bb2f9c5e7135b560318208c8.zip
rewrite site and stop using iframes
Diffstat (limited to 'scripts/gengit')
-rwxr-xr-xscripts/gengit13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/gengit b/scripts/gengit
new file mode 100755
index 0000000..ff268ee
--- /dev/null
+++ b/scripts/gengit
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+repos=$(ls -1 /var/git | grep -o '.*\.git' | head -5)
+
+# delete old list
+sed -i -n '1,/ <p> <!-- script marker git -->/p;/ <\/p> <!-- script marker git -->/,$p' index.html
+
+for i in $repos ; do
+ name=$(echo $i | sed 's/\.git//')
+ line="<a href=\"https://git.squi.bid/$name\" target=\"top\" id=\"link\">$name</a><br>"
+ # add new repo
+ sed -i "/ <\/p> <!-- script marker git -->/i $line" index.html
+done