2024-05-04 17:48:37 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -eo pipefail
|
|
|
|
|
|
|
|
# So we don't need to replace all lines for one single environment variable or sth else
|
|
|
|
function generate-link() {
|
|
|
|
LINKGEN_NO_DEFAULT=y ./build.sh $@
|
|
|
|
}
|
|
|
|
|
|
|
|
# Clone website-redirector if not present
|
|
|
|
if [ ! -f "website-redirector/build.sh" ]; then
|
|
|
|
git submodule update --init --recursive
|
|
|
|
fi
|
|
|
|
# cd into website-redirector repository
|
|
|
|
cd website-redirector
|
|
|
|
# remove 'out' directory
|
|
|
|
rm -rf out
|
|
|
|
|
|
|
|
# Add general links
|
|
|
|
generate-link "website" "JeremyStarTM's website" "https://jstm.staropensource.de"
|
|
|
|
# Add social links
|
|
|
|
generate-link "social-fedi" "JeremyStarTM's fediverse profile" "https://fly.staropensource.de/@jeremystartm"
|
|
|
|
generate-link "social-email" "JeremyStarTM's email address" "mailto:jeremystartm@staropensource.de"
|
|
|
|
generate-link "social-mail "JeremyStarTM's email address" "/social-email"
|
|
|
|
generate-link "social-discord" "JeremyStarTM's Discord guild" "https://discord.gg/4HEu5qkcU4
|
|
|
|
# Add repository links
|
|
|
|
generate-link "repos" "JeremyStarTM's repositories" "https://git.staropensource.de/JeremyStarTM"
|
|
|
|
generate-link "repos-kernel" "JeremyStarTM's optimized linux kernel repository" "https://git.staropensource.de/JeremyStarTM/kernel-optimized"
|
|
|
|
generate-link "repos-usrdotfiles" "JeremyStarTM's dotfiles" "https://git.staropensource.de/JeremyStarTM/punktdateien"
|
|
|
|
generate-link "repos-sysdotfiles" "JeremyStarTM's system-wide dotfiles" "https://git.staropensource.de/JeremyStarTM/syspunktdateien"
|
|
|
|
generate-link "repos-presencode" "Presencode repository" "https://git.staropensource.de/JeremyStarTM/Presencode"
|
|
|
|
generate-link "repos-osuboot" "osu!boot repository" "https://git.staropensource.de/JeremyStarTM/osuboot"
|
|
|
|
generate-link "repos-docker-pihole" "JeremyStarTM#s dockerized Pi-hole setup repository" "https://git.staropensource.de/JeremyStarTM/pihole-docker"
|
|
|
|
generate-link "repos-docker-minecraft" "JeremyStarTM's dockerized Minecraft server setup repository" "https://git.staropensource.de/JeremyStarTM/MCServerDocker"
|
|
|
|
# Add index
|
|
|
|
cat << EOF > out/index.html
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
2024-05-04 18:44:23 +02:00
|
|
|
<head>
|
2024-05-04 18:45:34 +02:00
|
|
|
<title>Hier findest du nix</title>
|
2024-05-04 18:44:39 +02:00
|
|
|
<meta charset="UTF-8"/>
|
2024-05-04 18:44:23 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<center>
|
|
|
|
<p>Hai! Du bist auf der Weiterleitungswebseite von JeremyStarTM gelandet.</p>
|
|
|
|
<p>Du kannst den Quellcode dieser Seite <a href="/repos-redirector">hier</a> einsehen.</p>
|
|
|
|
<br/>
|
|
|
|
<p>Hier ein paar Beispiellinks für dich:</p>
|
|
|
|
<p><a href="/website">[website]</a> <a href="/social-fedi">[social-fedi]</a> <a href="/repos">[repos]</a></p>
|
|
|
|
</center>
|
|
|
|
</body>
|
2024-05-04 17:48:37 +02:00
|
|
|
</html>
|
|
|
|
EOF
|
|
|
|
# Add robots.txt
|
|
|
|
cat << EOF > out/robots.txt
|
|
|
|
User-Agent: *
|
|
|
|
Disallow: /
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# Move 'out' directory to parent directory
|
|
|
|
rm -rf ../out
|
|
|
|
mv out ..
|