Debian Codegraph @

debian/aide.conf.d/10_aide_os-release

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 import_filescip-shell shell shell-project 0.0.0 import_file().() {
4 file=$1
5
6 [scip-shell system . . `[`. -f "$file" ] || return 0
7
8 eval "$(
9 sedscip-shell system . . sed. -n '
10 /^[[:space:]]*#/d
11 /^[[:space:]]*$/d
12 s/^[[:space:]]*\([A-Za-z_][A-Za-z0-9_]*\)=/OS_RELEASE_\1=/
13 p
14 ' "$file"
15 )"
16 }
17
18 import_filescip-shell shell shell-project 0.0.0 import_file(). /etc/os-releasescip-shell filesystem . . `/etc/os-release`.
19 import_filescip-shell shell shell-project 0.0.0 import_file(). /usr/lib/os-releasescip-shell filesystem . . `/usr/lib/os-release`.
20 import_filescip-shell shell shell-project 0.0.0 import_file(). /etc/initrd-releasescip-shell filesystem . . `/etc/initrd-release`.
21
22 for file in /usr/lib/extension-release/*; do
23 [scip-shell system . . `[`. -f "$file" ] || continue
24 import_filescip-shell shell shell-project 0.0.0 import_file(). "$file"
25 done
26
27 if [scip-shell system . . `[`. -z "${OS_RELEASE_VERSION_ID:-}" ]; then
28 if [scip-shell system . . `[`. "$OS_RELEASE_VERSION_CODENAME" = "forky" ]; then
29 OS_RELEASE_VERSION_ID=14
30 OS_RELEASE_VERSION="14 (forky)"
31 OS_RELEASE_DEBIAN_VERSION_FULL="14"
32 fi
33 fi
34
35 _codename_uc="$(echoscip-shell system . . echo. "$OS_RELEASE_VERSION_CODENAME" | trscip-shell system . . tr. '[:lower:]' '[:upper:]')"
36 printfscip-shell system . . printf. '@@define OS_RELEASE_VERSION_CODENAME_%s %s\n' "${_codename_uc}" "${_codename_uc}"
37
38
39 set | awkscip-shell system . . awk. -F= '
40 /^OS_RELEASE_[A-Za-z_][A-Za-z0-9_]*=/ {
41 value=$2
42 for (i=3; i<=NF; i++)
43 value=value "=" $i
44 if (value ~ /^".*"$/ || value ~ /^\047.*\047$/)
45 value=substr(value, 2, length(value)-2)
46 gsub(/[[:space:]]/, "_", value)
47 print "@@define " $1 " " value
48 }
49 '