aboutsummaryrefslogtreecommitdiff
path: root/docker/crupest-debian-dev/bootstrap/apt-source/12/get-domain.bash
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2024-08-14 00:28:12 +0800
committercrupest <crupest@outlook.com>2024-08-14 22:58:21 +0800
commit61cd7dabdd2c5272a952edd40dffcbc368b596b1 (patch)
tree4141dbea334763699c16c95183fa49269e97e629 /docker/crupest-debian-dev/bootstrap/apt-source/12/get-domain.bash
parentfa5eb7f373ae37ba5e9838aeb75809e0c0884cea (diff)
downloadcrupest-61cd7dabdd2c5272a952edd40dffcbc368b596b1.tar.gz
crupest-61cd7dabdd2c5272a952edd40dffcbc368b596b1.tar.bz2
crupest-61cd7dabdd2c5272a952edd40dffcbc368b596b1.zip
feat(docker/debian-dev): support both 11 and 12 for apt source.
Diffstat (limited to 'docker/crupest-debian-dev/bootstrap/apt-source/12/get-domain.bash')
-rwxr-xr-xdocker/crupest-debian-dev/bootstrap/apt-source/12/get-domain.bash6
1 files changed, 6 insertions, 0 deletions
diff --git a/docker/crupest-debian-dev/bootstrap/apt-source/12/get-domain.bash b/docker/crupest-debian-dev/bootstrap/apt-source/12/get-domain.bash
new file mode 100755
index 0000000..a24538c
--- /dev/null
+++ b/docker/crupest-debian-dev/bootstrap/apt-source/12/get-domain.bash
@@ -0,0 +1,6 @@
+#! /usr/bin/env bash
+
+set -e
+
+grep -e 'URIs:' /etc/apt/sources.list.d/debian.sources | \
+ sed -E 's|URIs:\s*https?://([-_.a-zA-Z0-9]+)/.*|\1|;q'