forked from devcontainers/features
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbookworm.sh
More file actions
executable file
·45 lines (36 loc) · 891 Bytes
/
Copy pathbookworm.sh
File metadata and controls
executable file
·45 lines (36 loc) · 891 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
FAILED=()
echoStderr()
{
echo "$@" 1>&2
}
checkOSPackages() {
LABEL=$1
shift
echo -e "\n🧪 Testing $LABEL"
if dpkg-query --show -f='${Package}: ${Version}\n' "$@"; then
echo "✅ Passed!"
return 0
else
echoStderr "❌ $LABEL check failed."
FAILED+=("$LABEL")
return 1
fi
}
checkCommon()
{
PACKAGE_LIST="manpages-posix \
manpages-posix-dev"
checkOSPackages "Installation of manpages-posix and manpages-posix-dev (non-free)" ${PACKAGE_LIST}
}
# Check for manpages-posix, manpages-posix-dev non-free packages
checkCommon
# Definition specific tests
. /etc/os-release
check "non-root user" test "$(whoami)" = "devcontainer"
check "distro" test "${VERSION_CODENAME}" = "bookworm"
# Report result
reportResults