mrrl

Minimal Reliable Reproducible Linux
git clone https://ccx.te2000.cz/git/mrrl
Log | Files | Refs | Submodules | README

alpine-keys (2114B)


      1 #!/usr/bin/env pthbs-build
      2 #+busybox.d2d7aa00eac6ec561a10d126b1866f22e226a1276307466251e80fd8a4a1ebc7
      3 #+busybox-findutils.85b2328981df683d1ae7597eebdf3a332aa4241b936c0030fe3618cec1f4841a
      4 #+busybox-awk.4c3f8cc249ba35f1206fcaf2979bcfd66d09b117eeea4e6a939024825a542496
      5 #@git:c7b36ed27103ee3f9aa01905ba1fac2d606079cf:alpine-keys
      6 
      7 
      8 # - build script start -
      9 
     10 prefix=/home/ccx/versions/$pthbs_package
     11 dest=${pthbs_destdir%/}${prefix}
     12 cd 'alpine-keys'
     13 
     14 
     15 mkdir -p "${dest}/keys"
     16 mv keys "${dest}/keys/alpine"
     17 
     18 
     19 
     20 
     21 cd "$pthbs_destdir/home/ccx/versions/$pthbs_package"
     22 find -type d -o -print | awk -F/ '
     23 BEGIN {
     24 	x["./keys/alpine/alpine-devel@lists.alpinelinux.org-58199dcc.rsa.pub"]=1
     25 	x["./keys/alpine/alpine-devel@lists.alpinelinux.org-616ae350.rsa.pub"]=1
     26 }
     27 
     28 function r1(s) {
     29 	sub("^[.]/[^/]*", ".", s)
     30 	return s
     31 }
     32 function s1(repl, s) {
     33 	sub("^[.]/[^/]*", "./"repl, s)
     34 	return s
     35 }
     36 function link(src) {
     37 	x[$0]=0
     38 	printf "%s\t%s\n", $0, src
     39 	printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr"
     40 }
     41 $1!="."{exit 1}
     42 
     43 
     44 $2 == "keys" { link($0); next }
     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