commit 9447710

hovercats  ·  2025-06-05 11:08:09 +0000 UTC
parent 96aecd0
rename die function to errexit
1 files changed,  +4, -4
M rcpm
M rcpm
+4, -4
 1@@ -10,13 +10,13 @@ fn log {
 2 	printf '%s\n' $"*
 3 }
 4 
 5-fn die {
 6+fn errexit {
 7 	log ERROR: $"*
 8 	exit 1
 9 }
10 
11 if (~ $#RCPM_PATH 0) {
12-	die 'RCPM_PATH is not set'
13+	errexit 'RCPM_PATH is not set'
14 }
15 
16 fn rcpm_help {
17@@ -36,7 +36,7 @@ fn dl_pkg {
18 		}
19 	}
20 	if not {
21-		die 'Url file not found!'
22+		errexit 'Url file not found!'
23 	}
24 }
25 
26@@ -45,7 +45,7 @@ fn chksum_pkg {
27 	dl_pkg
28 	if (test -f sha256) sha256sum -c sha256
29 	if not {
30-		die 'sha256 file not found, cannot verify sha256sum!'
31+		errexit 'sha256 file not found, cannot verify sha256sum!'
32 	}
33 }
34