From e4a2415c13b9fa34a9c7b80d19120bfb1caa3319 Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Mon, 18 May 2020 11:57:59 +0300 Subject: use kiss as a library --- mkrootfs.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'mkrootfs.sh') diff --git a/mkrootfs.sh b/mkrootfs.sh index 453e005..134b46a 100755 --- a/mkrootfs.sh +++ b/mkrootfs.sh @@ -4,6 +4,12 @@ # Bootstrapper for Carbs Linux # See LICENSE file for copyright and license details +# Source kiss as a library +kissloc=$(command -v kiss) +kissln=$(wc -l < "$kissloc") +sed "${kissln}d" "$kissloc" > .kisslib +. ./.kisslib + # Functions msg() { printf '\033[1;35m-> \033[m%s\n' "$@" ;} @@ -26,23 +32,27 @@ BASEDIR="$PWD" [ "$PKGS" ] || die "You must set PKGS variable to continue the bootstrapper" [ "$MNTDIR" ] || die "You must specify fakeroot location 'MNTDIR' in order to continue the bootstrapper" +# Word splitting is intentional here +# shellcheck disable=2086 +pkg_order $PKGS # Print variables from the configuration file cat <