commit 7eb48cc

chld  ·  2026-09-22 22:21:00 +0000 UTC
parent 872fca2
remove extra stuff in lib.sh
2 files changed,  +2, -25
+2, -2
 1@@ -1,8 +1,8 @@
 2 #!/bin/sh -eu
 3 . ./util/lib.sh # source functions
 4 
 5-_war "$0 assumes you have your root parition mounted at ${m}!"
 6-_war "$0 will remove all files from ${m}!"
 7+printf "$0 assumes you have your root parition mounted at ${m}!\n"
 8+printf "$0 will remove all files from ${m}!\n"
 9 set -x
10 
11 rm -rf $m/*
+0, -23
 1@@ -20,26 +20,3 @@ _inc(){
 2 	#	touch mwakat
 3 	# '
 4 }
 5-
 6-_swt(){
 7-	# idiot proofing: do not link if command doesnt exist
 8-	# 	-instead, return (avoiding link, and error)
 9-	if ! test -e $m/bin/$1; then return 0 ; fi
10-	if ! test -e $m/usr/bin/$2; then return 0 ; fi
11-
12-	__hhc ln
13-
14-	$u -sf /bin/$1 $m/usr/bin/$2
15-	$u -sf /bin/$1 $m/sbin/$2   # link both ways
16-	# usage: _swt toybox ln
17-}
18-
19-_war(){
20-	printf "\033[m\033[1;31mWARNING:\033[m\033[1m "
21-	printf "$1\033[m\n"
22-}
23-
24-log(){
25-	printf "\033[m\033[1;32m$0\033[m\033[1m "
26-	printf "$1\033[m\n"
27-}