[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'
awk -F '\n' '
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)
match(line, /^[ \t]*\#+[ \t]*/)
return RSTART ? (RLENGTH + 1) : 0
@ -143,7 +143,7 @@ function rest(line, sep_re) {
# (or nothing if sep is not found)
if (!sep_re) sep_re = "[" SUBSEP "]"
if (match(line, sep_re))
return substr(line, RSTART + RLENGTH + 1)
return substr(line, RSTART + RLENGTH)
}
function conf_pop(word, value) {
@ -189,7 +189,7 @@ function print_confs(word, value) {
}
BEGIN {
EQS = /[ \t]/ # copied from dma/conf.c
EQS = "[ \t]" # copied from dma/conf.c
# read the "should" state into the `conf` array.
while (getline < "/dev/stdin") {
@ -206,7 +206,7 @@ BEGIN {
NR == FNR {
if (comment_line($0)) {
# 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
} else {
word = first($0, EQS)

View file

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