#!/usr/bin/env bash # https://liquorix.net apt-get install -y apt-transport-https #codename="$(find /etc/apt -type f -name '*.list' | xargs grep -E '^deb' | awk '{print $3}' | grep -Eo '^[a-z]+' | sort | uniq -c | sort -n | tail -n1 | grep -Eo '[a-z]+$')" # codename: # https://liquorix.net/debian/dists/ #[DIR] bullseye/ 2020-02-15 14:04 - #[DIR] buster/ 2020-02-15 14:04 - #[DIR] oldstable/ 2020-02-15 14:04 - #[DIR] sid/ 2020-02-15 14:04 - #[DIR] stable/ 2020-02-15 14:04 - #[DIR] stretch/ 2020-02-15 14:04 - #[DIR] testing/ 2020-02-15 14:04 - #[DIR] unstable/ 2020-02-15 14:04 - # stable == buster # testing == bullseye # unstable == sid codename=testing cat > /etc/apt/sources.list-available/liquorix.list <