commit bf2ab34

hovercats  ·  2026-09-08 17:00:14 +0000 UTC
parent e45ab39
readd fetch.rc usage. it was accedently removed earlier, and I kinda forgot about it.
1 files changed,  +16, -13
M rcpm
M rcpm
+16, -13
 1@@ -50,20 +50,23 @@ fn chksum_pkg {
 2 }
 3 
 4 fn unpack_pkg {
 5-	for (archive in `{awk '{print $2}' sha256}) {
 6-		switch($archive) {
 7-			case *.tar.gz
 8-				tool=gzip
 9-			case *.tar.xz
10-				tool=xz
11-			case *.tar.bz2
12-				tool=bzip2
13-			case *.tar.zst
14-				tool=zstd
15-			case *
16-				exit 1
17+	if (test -f fetch.rc) ./fetch.rc
18+	if not {
19+		for (archive in `{awk '{print $2}' sha256}) {
20+			switch($archive) {
21+				case *.tar.gz
22+					tool=gzip
23+				case *.tar.xz
24+					tool=xz
25+				case *.tar.bz2
26+					tool=bzip2
27+				case *.tar.zst
28+					tool=zstd
29+				case *
30+					exit 1
31+			}
32+		$tool -dc $archive | pax -r -s ',^[^/]*,src,'
33 		}
34-	$tool -dc $archive | pax -r -s ',^[^/]*,src,'
35 	}
36 }
37