From 7bba6cd7612293796e905885f9ed3072877798ab Mon Sep 17 00:00:00 2001 From: davidovski Date: Mon, 27 Jun 2022 01:14:42 +0100 Subject: added shmk, building all with shmk --- src/xilib.sh | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 src/xilib.sh (limited to 'src/xilib.sh') diff --git a/src/xilib.sh b/src/xilib.sh deleted file mode 100644 index 57dd10c..0000000 --- a/src/xilib.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -# format a number into a bytes, kibibytes, mebibytes, or gibibytes -# -format_bytes () { - case "1" in - "$(($1>=1<<30))") printf "$(($1>>30))GiB";; - "$(($1>=1<<20))") printf "$(($1>>20))MiB";; - "$(($1>=1<<10))") printf "$(($1>>10))kiB";; - *) printf "$1B";; - esac -} - -# ensure that the user is a root user -# -checkroot () { - [ "$(id -u)" = "0" ] || { - printf "${RED}Please run as root!${RESET}\n" - exit 1 - } -} - -# reverse the order of lines -# -reverse_lines () { - local result= - while IFS= read -r line; do - result="$line - $result" - done - echo "$result" -} - - -- cgit v1.2.1