system-config-rc (2305B)
1 #!/usr/bin/env pthbs-build 2 #+busybox.539513a18a06a21e4660004fea30f3658959c5c7f54488b66b5fee7120b0c27c 3 #+busybox-findutils.3ba95afbbde5f39d6a3c0b17d82ff2e5350904cf19dd40acdf1c60ed126d3bda 4 #+busybox-awk.4ac003d165540d0084cd08c1386f136343851ef344ac5ff844769b058049d859 5 #+busybox-diffutils.b820ef7a40bea977a2bf740425ae15b2d9a21097bcf3a2f5ec77c21782b9deb8 6 #+s6-rc.b34650e8572f705c4e28a97fc20a025ea567d94209d26f9d62eb4e5f50c88f25 7 #+fileset.bd2146530774411c5f6d6c623cefefa8a045b8805fa23157da1949c6f5dfa0e8 8 #+system-config.fe772b12e2a1128b62c27e31c24460cf067c9bac36e123bd87acd8e8ea3b46dc 9 10 11 # - build script start - 12 13 prefix=/versions/$pthbs_package 14 dest=${pthbs_destdir%/}${prefix} 15 cd '.' 16 17 18 src=/versions/system-config.fe772b12e2a1128b62c27e31c24460cf067c9bac36e123bd87acd8e8ea3b46dc/config/s6-rc-source 19 s6-rc-compile ./s6-rc-db "$src" 20 mkdir -p "$dest/config" 21 mv -v s6-rc-db "$dest/config/" 22 23 24 25 26 cd "$pthbs_destdir/versions/$pthbs_package" 27 find -type d -o -print | awk -F/ ' 28 BEGIN {} 29 30 function r1(s) { 31 sub("^[.]/[^/]*", ".", s) 32 return s 33 } 34 function s1(repl, s) { 35 sub("^[.]/[^/]*", "./"repl, s) 36 return s 37 } 38 function link(src) { 39 x[$0]=0 40 printf "%s\t%s\n", $0, src 41 printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" 42 } 43 $1!="."{exit 1} 44 45 46 $2 == "config" { link($0); next } 47 $2 == "keys" { link($0); next } 48 $2 == "zsh" { link($0); next } 49 $2 == "env" { link($0); next } 50 $2 == "command" { link($0); next } 51 $2 == "bin" { link(s1("command", $0)); next } 52 53 $2 == "library.so" { link($0); next } 54 $2 == "library" { link($0); next } 55 $2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } 56 $2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } 57 58 $2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next } 59 60 $2 == "man" { link($0); next } 61 $2 == "info" { link($0); next } 62 $2 == "doc" { link($0); next } 63 $2 == "icons" { link($0); next } 64 $2 == "terminfo" { link($0); next } 65 $2 == "data" { link($0); next } 66 $2 == "include" { link($0); next } 67 68 { printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } 69 70 END { 71 for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } 72 for(fname in x) { 73 if(x[fname]) { 74 printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" 75 exit 3 76 } 77 } 78 }' >.install-links.new 79 mv .install-links.new .install-links 80