[type/__dma] Add support for Alpine Linux

requires the testing repository, currently.
This commit is contained in:
Dennis Camera 2020-06-22 14:02:13 +02:00
parent 0f81b89f70
commit 27b832f212
2 changed files with 8 additions and 4 deletions

View file

@ -122,7 +122,7 @@ then
cat <<'EOF' cat <<'EOF'
awk -F '\n' ' awk -F '\n' '
function comment_line(line) { function comment_line(line) {
# returns the position in line at which the comment's text starts # returns the position in line at which the comment'\''s text starts
# (0 if the line is not a comment) # (0 if the line is not a comment)
match(line, /^[ \t]*\#+[ \t]*/) match(line, /^[ \t]*\#+[ \t]*/)
return RSTART ? (RLENGTH + 1) : 0 return RSTART ? (RLENGTH + 1) : 0
@ -143,7 +143,7 @@ function rest(line, sep_re) {
# (or nothing if sep is not found) # (or nothing if sep is not found)
if (!sep_re) sep_re = "[" SUBSEP "]" if (!sep_re) sep_re = "[" SUBSEP "]"
if (match(line, sep_re)) if (match(line, sep_re))
return substr(line, RSTART + RLENGTH + 1) return substr(line, RSTART + RLENGTH)
} }
function conf_pop(word, value) { function conf_pop(word, value) {
@ -189,7 +189,7 @@ function print_confs(word, value) {
} }
BEGIN { BEGIN {
EQS = /[ \t]/ # copied from dma/conf.c EQS = "[ \t]" # copied from dma/conf.c
# read the "should" state into the `conf` array. # read the "should" state into the `conf` array.
while (getline < "/dev/stdin") { while (getline < "/dev/stdin") {
@ -206,7 +206,7 @@ BEGIN {
NR == FNR { NR == FNR {
if (comment_line($0)) { if (comment_line($0)) {
# comment line # comment line
word = first(substr($0, comment_line($0) + 1), /[ ]/) word = first(substr($0, comment_line($0)), " ")
if (is_word(word)) last_occ["#" word] = FNR if (is_word(word)) last_occ["#" word] = FNR
} else { } else {
word = first($0, EQS) word = first($0, EQS)

View file

@ -5,6 +5,10 @@ os=$(cat "${__global}/explorer/os")
# Install DMA # Install DMA
case $os case $os
in in
(alpine)
__package dma --state present
export require='__package/dma'
;;
(debian|devuan|ubuntu) (debian|devuan|ubuntu)
__package dma --state present __package dma --state present
export require='__package/dma' export require='__package/dma'