Bläddra i källkod

Fix index script file sorting

HON95 2 år sedan
förälder
incheckning
30b27809de
2 ändrade filer med 108 tillägg och 104 borttagningar
  1. 103 101
      index.md
  2. 5 3
      make-index.sh

+ 103 - 101
index.md

@@ -6,151 +6,153 @@ no_toc: true
 
 Random collection of config notes and miscellaneous stuff. _Technically not a wiki._
 
-## General
+_(Alphabetically sorted, so it might seem a bit strange.)_
 
-- [General](/general/general/)
-- [Linux General](/general/linux-general/)
-- [Computer Testing](/general/computer-testing/)
+## Authentication, Authorization and Accounting (AAA)
+
+- [FreeIPA](/aaa/freeipa/)
+- [Kerberos](/aaa/kerberos/)
+
+## Automation
+
+- [Ansible](/automation/ansible/)
+- [Puppet](/automation/puppet/)
 
 ## Cloud
 
 - [AWS](/cloud/aws/)
 - [Azure](/cloud/azure/)
 
-## Automation
+## Computers
 
-- [Puppet](/automation/puppet/)
-- [Ansible](/automation/ansible/)
+- [Dell OptiPlex Series](/computers/dell-optiplex/)
+- [Dell PowerEdge Series](/computers/dell-poweredge/)
+- [Dell PowerEdge Series](/computers/hp-proliant/)
+- [PCs](/computers/pcs/)
+
+## Crypto
+
+- [Headless Linux ETH Mining](/crypto/headless-linux-eth-mining/)
+
+## Game Servers
+
+- [Counter-Strike: Global Offensive (CS:GO)](/game-server/csgo/)
+- [Minecraft (Bukkit)](/game-server/minecraft-bukkit/)
+- [Team Fortress 2 (TF2)](/game-server/tf2/)
+
+## General
+
+- [Computer Testing](/general/computer-testing/)
+- [General](/general/general/)
+- [Linux General](/general/linux-general/)
 
 ## High-Performance Computing (HPC)
 
-- [HIP](/hpc/hip/)
-- [Enroot](/hpc/enroot/)
 - [Betzy (Supercomputer)](/hpc/betzy/)
-- [Vilje (Supercomputer)](/hpc/vilje/)
-- [ROCm](/hpc/rocm/)
+- [Containers](/hpc/containers/)
+- [CUDA](/hpc/cuda/)
+- [Enroot](/hpc/enroot/)
+- [HIP](/hpc/hip/)
+- [Interconnects](/hpc/interconnects/)
 - [Open MPI](/hpc/openmpi/)
+- [ROCm](/hpc/rocm/)
 - [Singularity](/hpc/singularity/)
 - [HPC Cluster](/hpc/slurm/)
-- [Interconnects](/hpc/interconnects/)
-- [CUDA](/hpc/cuda/)
-- [Containers](/hpc/containers/)
+- [Vilje (Supercomputer)](/hpc/vilje/)
 
-## Network
+## IoT & Home Automation
 
-- [Brocade FastIron Switches](/network/brocade-fastiron-switches/)
-- [Juniper Junos General](/network/juniper-junos-general/)
-- [Ubiquiti UniFi Access Points](/network/ubiquiti-unifi-aps/)
-- [Wireless Basics](/network/wireless-basics/)
-- [Cisco IOS General](/network/cisco-ios-general/)
-- [Cisco Hardware](/network/cisco-hardware/)
-- [Linksys LGS Switches](/network/linksys-lgs/)
-- [Cisco IOS Routers](/network/cisco-ios-routers/)
-- [Network Architecture](/network/architecture/)
-- [Juniper EX Series Switches](/network/juniper-junos-switches/)
-- [General](/network/general/)
-- [FS FSOS Switches](/network/fs-fsos-switches/)
-- [Network Security](/network/security/)
-- [Juniper Hardware](/network/juniper-hardware/)
-- [VyOS](/network/vyos/)
-- [WLAN Theory](/network/wlan/)
-- [IPv6 Theory](/network/ipv6/)
-- [TP-Link JetStream Switches](/network/tplink-jetstream-switches/)
-- [Cisco IOS Switches](/network/cisco-ios-switches/)
-- [BGP](/network/bgp/)
-- [Linux Switching & Routing](/network/linux/)
-- [Ubiquiti UniFi Controllers](/network/ubiquiti-unifi-controllers/)
-- [Switching](/network/switching/)
-- [Juniper EX3300 Fan Mod](/network/juniper-ex3300-fanmod/)
-- [IPv6 Theory](/network/ipv4/)
-- [Routing Theory](/network/routing/)
-- [pfSense](/network/pfsense/)
+- [Home Assistant](/iot-ha/home-assistant/)
+- [Raspberry Pi](/iot-ha/raspberry-pi/)
 
-## Computers
+## Linux Server
 
-- [PCs](/computers/pcs/)
-- [Dell OptiPlex Series](/computers/dell-optiplex/)
-- [Dell PowerEdge Series](/computers/hp-proliant/)
-- [Dell PowerEdge Series](/computers/dell-poweredge/)
+- [Linux Server Applications](/linux-server/applications/)
+- [Debian Server](/linux-server/debian/)
+- [Linux Server Storage](/linux-server/storage/)
+- [Linux Server Storage: Ceph](/linux-server/storage-ceph/)
+- [Linux Server Storage: ZFS](/linux-server/storage-zfs/)
 
 ## Media
 
-- [Video Ripping](/media/video-ripping/)
-- [Video4Linux 2 (V4L2)](/media/v4l2/)
-- [Video Streaming](/media/video-streaming/)
-- [youtube-dl](/media/youtube-dl/)
+- [Audio Basics](/media/audio-basics/)
 - [DMX512](/media/dmx512/)
+- [FFmpeg](/media/ffmpeg/)
 - [Media: General](/media/general/)
-- [Audio Basics](/media/audio-basics/)
+- [Video4Linux 2 (V4L2)](/media/v4l2/)
 - [Video Processing](/media/video-processing/)
-- [FFmpeg](/media/ffmpeg/)
+- [Video Ripping](/media/video-ripping/)
+- [Video Streaming](/media/video-streaming/)
 - [VLC](/media/vlc/)
-
-## Virtualization, Containerization and Orchestration
-
-- [Docker](/virt-cont/podman/)
-- [Docker](/virt-cont/docker/)
-- [Proxmox VE](/virt-cont/proxmox-ve/)
-- [libvirt & KVM](/virt-cont/libvirt-kvm/)
-- [Kubernetes](/virt-cont/k8s/)
-
-## Crypto
-
-- [Headless Linux ETH Mining](/crypto/headless-linux-eth-mining/)
-
-## IoT & Home Automation
-
-- [Raspberry Pi](/iot-ha/raspberry-pi/)
-- [Home Assistant](/iot-ha/home-assistant/)
+- [youtube-dl](/media/youtube-dl/)
 
 ## Monitoring
 
 - [Grafana](/monitoring/grafana/)
-- [Prometheus](/monitoring/prometheus/)
 - [Grafana Loki](/monitoring/loki/)
+- [Prometheus](/monitoring/prometheus/)
 
-## Authentication, Authorization and Accounting (AAA)
-
-- [Kerberos](/aaa/kerberos/)
-- [FreeIPA](/aaa/freeipa/)
-
-## Services
-
-- [DNS Theory](/services/dns/)
-- [Email Theory](/services/email/)
-
-## Software Engineering
+## Network
 
-- [Licensing](/se/licensing/)
-- [CUDA](/se/go/)
-- [Database Management Systems (DBMSes)](/se/dbmses/)
-- [Web Security](/se/web-security/)
-- [Data Stuff](/se/data/)
+- [Network Architecture](/network/architecture/)
+- [BGP](/network/bgp/)
+- [Brocade FastIron Switches](/network/brocade-fastiron-switches/)
+- [Cisco Hardware](/network/cisco-hardware/)
+- [Cisco IOS General](/network/cisco-ios-general/)
+- [Cisco IOS Routers](/network/cisco-ios-routers/)
+- [Cisco IOS Switches](/network/cisco-ios-switches/)
+- [FS FSOS Switches](/network/fs-fsos-switches/)
+- [General](/network/general/)
+- [IPv6 Theory](/network/ipv4/)
+- [IPv6 Theory](/network/ipv6/)
+- [Juniper EX3300 Fan Mod](/network/juniper-ex3300-fanmod/)
+- [Juniper Hardware](/network/juniper-hardware/)
+- [Juniper Junos General](/network/juniper-junos-general/)
+- [Juniper EX Series Switches](/network/juniper-junos-switches/)
+- [Linksys LGS Switches](/network/linksys-lgs/)
+- [Linux Switching & Routing](/network/linux/)
+- [pfSense](/network/pfsense/)
+- [Routing Theory](/network/routing/)
+- [Network Security](/network/security/)
+- [Switching](/network/switching/)
+- [TP-Link JetStream Switches](/network/tplink-jetstream-switches/)
+- [Ubiquiti UniFi Access Points](/network/ubiquiti-unifi-aps/)
+- [Ubiquiti UniFi Controllers](/network/ubiquiti-unifi-controllers/)
+- [VyOS](/network/vyos/)
+- [Wireless Basics](/network/wireless-basics/)
+- [WLAN Theory](/network/wlan/)
 
 ## Personal Computers
 
-- [Kubuntu](/pc/kubuntu/)
 - [PC Applications](/pc/applications/)
-- [Windows](/pc/windows/)
 - [Arch (i3)](/pc/arch-i3/)
+- [Kubuntu](/pc/kubuntu/)
 - [Manjaro (KDE)](/pc/manjaro-kde/)
+- [Windows](/pc/windows/)
 
-## Linux Server
+## Power
 
-- [Linux Server Storage](/linux-server/storage/)
-- [Debian Server](/linux-server/debian/)
-- [Linux Server Applications](/linux-server/applications/)
-- [Linux Server Storage: ZFS](/linux-server/storage-zfs/)
-- [Linux Server Storage: Ceph](/linux-server/storage-ceph/)
+- [APC PDUs](/power/apc-pdus/)
 
-## Game Servers
+## Software Engineering
 
-- [Counter-Strike: Global Offensive (CS:GO)](/game-server/csgo/)
-- [Minecraft (Bukkit)](/game-server/minecraft-bukkit/)
-- [Team Fortress 2 (TF2)](/game-server/tf2/)
+- [Data Stuff](/se/data/)
+- [Database Management Systems (DBMSes)](/se/dbmses/)
+- [CUDA](/se/go/)
+- [Licensing](/se/licensing/)
+- [Web Security](/se/web-security/)
 
-## Power
+## Services
 
-- [APC PDUs](/power/apc-pdus/)
+- [DNS Theory](/services/dns/)
+- [Email Theory](/services/email/)
+
+## Virtualization, Containerization and Orchestration
+
+- [Docker](/virt-cont/docker/)
+- [Kubernetes](/virt-cont/k8s/)
+- [libvirt & KVM](/virt-cont/libvirt-kvm/)
+- [Docker](/virt-cont/podman/)
+- [Proxmox VE](/virt-cont/proxmox-ve/)
 
 {% include footer.md %}

+ 5 - 3
make-index.sh

@@ -19,10 +19,12 @@ no_toc: true
 {% include header.md %}
 
 Random collection of config notes and miscellaneous stuff. _Technically not a wiki._
+
+_(Alphabetically sorted, so it might seem a bit strange.)_
 EOF
 
 # Add categories and pages
-for dir in $(find . -mindepth 1 -type d); do
+for dir in $(find . -mindepth 1 -type d | sort | sed 's|^\./||'); do
     # Check if the dir contains a name file
     if [[ ! -f $dir/_name ]]; then
         continue
@@ -33,8 +35,8 @@ for dir in $(find . -mindepth 1 -type d); do
     echo "## $dir_name" >> "$index_file"
     echo >> "$index_file"
 
-    for file in $(find "$dir" -type f -name '*.md'); do
-        link="$(echo $file | sed 's|^\./|/|' | sed 's|\.md$|/|')"
+    for file in $(find "$dir" -type f -name '*.md' | sort -t. -k1,1); do
+        link="$(echo $file | sed 's|^|/|' | sed 's|\.md$|/|')"
         name="$(grep -Po -m1 '(?<=^title: ).+$' $file | sed -e 's|^\"||' -e "s|^'||" -e 's|\"$||' -e "s|'$||" || true)"
         if [[ $name == "" ]]; then
             echo "Missing name for page: $file" >&2