mkrootfs

Carbs rootfs generator
git clone git://git.carbslinux.org/mkrootfs
Log | Files | Refs | README | LICENSE

commit 3c34167115e653f63e8e4036e3c03550ca296bc6
parent dc238623f0e653badc865d777b58137eaafe92d1
Author: Cem Keylan <cem@ckyln.com>
Date:   Wed, 19 Feb 2020 13:38:30 +0300

modified message functions and removed out()

Diffstat:
Mmkrootfs.sh | 36++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/mkrootfs.sh b/mkrootfs.sh @@ -4,11 +4,10 @@ # Functions -out() { printf "%s\\n" "$@" ;} -msg() { printf "\033[1;35m=>\033[m $1\\n" ;} +msg() { printf '\033[1;35m=>\033[m %s\n' "$1" ;} error() { msg "\033[1;31mERROR: \033[m$1" ;} >&2 die() { error "$1"; exit 1 ;} -ask() { printf "\033[1;33m== $1 ==\\n(y/N) "; read ans; case "$ans" in [Yy]*) return 0 ;; *) return 1 ;; esac ;} +ask() { printf '\033[1;33m== %s ==\\n(y/N) ' "$1" ; read ans; case "$ans" in [Yy]*) return 0 ;; *) return 1 ;; esac ;} # Exit if the user is not root @@ -29,22 +28,23 @@ BASEDIR="$PWD" # Print variables from the configuration file -out \ -"Here are the configuration values:" \ -"" \ -"MNTDIR = $MNTDIR" \ -"" \ -"Build Options" \ -"CFLAGS = $CFLAGS" \ -"CXXFLAGS = $CXXFLAGS" \ -"MAKEFLAGS = $MAKEFLAGS" \ -"" \ -"Repository and package options" \ -"" \ -"REPO = $REPO" \ -"REPOSITORY PATH = $HOST_REPO_PATH" \ -"PKGS = $PKGS" +cat <<EOF +Here are the configuration values: +MNTDIR = $MNTDIR + +Build Options +CFLAGS = $CFLAGS +CXXFLAGS = $CXXFLAGS +MAKEFLAGS = $MAKEFLAGS + +Repository and package options + +REPO = $REPO +REPOSITORY PATH = $HOST_REPO_PATH +PKGS = $PKGS + +EOF # Check if there is no NOWELCOME variable set in # the configuration file. If there is such variable