public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: Matt Turner <mattst88@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Cc: Matt Turner <mattst88@gentoo.org>
Subject: [gentoo-catalyst] [PATCH 3/8] targets: Inline filesystem-functions.sh
Date: Fri,  1 May 2020 18:40:31 -0700	[thread overview]
Message-ID: <20200502014036.1039317-3-mattst88@gentoo.org> (raw)
In-Reply-To: <20200502014036.1039317-1-mattst88@gentoo.org>

Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
 targets/support/filesystem-functions.sh | 19 -------------------
 targets/support/target_image_setup.sh   | 20 ++++++--------------
 2 files changed, 6 insertions(+), 33 deletions(-)
 delete mode 100755 targets/support/filesystem-functions.sh

diff --git a/targets/support/filesystem-functions.sh b/targets/support/filesystem-functions.sh
deleted file mode 100755
index a95ae0b9..00000000
--- a/targets/support/filesystem-functions.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-# Dont forget to update functions.sh  check_looptype
-# $1 is the target directory for the filesystem
-
-create_squashfs() {
-	echo "Creating squashfs..."
-	export loopname="image.squashfs"
-	gensquashfs -D "${clst_destpath}" ${clst_fsops} "$1/${loopname}" \
-		|| die "gensquashfs failed, did you emerge squashfs-tools-ng?"
-}
-
-create_jffs2(){
-	echo "Creating jffs2..."
-	export loopname="image.jffs"
-	# fs_check /usr/sbin/mkfs.jffs2 jffs2 sys-fs/mtd
-	mkfs.jffs2 --root=${clst_destpath} --output=$1/${loopname} ${clst_fsops} \
-		|| die "Could not create a jffs2 filesystem"
-}
diff --git a/targets/support/target_image_setup.sh b/targets/support/target_image_setup.sh
index 423dc4c4..03cb4741 100755
--- a/targets/support/target_image_setup.sh
+++ b/targets/support/target_image_setup.sh
@@ -1,25 +1,17 @@
 #!/bin/bash
 
 source ${clst_shdir}/support/functions.sh
-source ${clst_shdir}/support/filesystem-functions.sh
 
-# Make the directory if it doesnt exist
-mkdir -p $1
+mkdir -p "${1}"
 
-loopret=1
+echo "Creating ${clst_fstype} filesystem"
 case ${clst_fstype} in
 	squashfs)
-		create_squashfs $1
-		loopret=$?
+		gensquashfs -D "${clst_destpath}" "${clst_fsops}" "${1}/image.squashfs" \
+			|| die "Failed to create squashfs filesystem"
 	;;
 	jffs2)
-		create_jffs2 $1
-		loopret=$?
+		mkfs.jffs2 --root="${clst_destpath}" --output="${1}/image.jffs" "${clst_fsops}" \
+			|| die "Failed to create jffs2 filesystem"
 	;;
 esac
-
-if [ ${loopret} = "1" ]
-then
-	die "Filesystem not setup"
-fi
-exit $loopret
-- 
2.26.2



  parent reply	other threads:[~2020-05-02  1:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-02  1:40 [gentoo-catalyst] [PATCH 1/8] targets: Use gensquashfs instead of mksquashfs Matt Turner
2020-05-02  1:40 ` [gentoo-catalyst] [PATCH 2/8] targets: Drop most fstypes Matt Turner
2020-05-02 23:00   ` Brian Dolbec
2020-05-02 23:17     ` Matt Turner
2020-05-02  1:40 ` Matt Turner [this message]
2020-05-02 23:03   ` [gentoo-catalyst] [PATCH 3/8] targets: Inline filesystem-functions.sh Brian Dolbec
2020-05-02 23:18     ` Matt Turner
2020-05-03  0:25       ` Brian Dolbec
2020-05-02  1:40 ` [gentoo-catalyst] [PATCH 4/8] targets: Remove unused source filesystem-functions.sh Matt Turner
2020-05-02 23:06   ` Brian Dolbec
2020-05-02 23:20     ` Matt Turner
2020-05-02 23:51       ` Brian Dolbec
2020-05-02  1:40 ` [gentoo-catalyst] [PATCH 5/8] targets: Remove run_crossdev() function Matt Turner
2020-05-02 23:06   ` Brian Dolbec
2020-05-02 23:22     ` Matt Turner
2020-05-02 23:45       ` Brian Dolbec
2020-05-02  1:40 ` [gentoo-catalyst] [PATCH 6/8] targets: Inline functions with one caller Matt Turner
2020-05-02 23:12   ` Brian Dolbec
2020-05-02  1:40 ` [gentoo-catalyst] [PATCH 7/8] targets: Remove unused extract_kernel() Matt Turner
2020-05-02 23:15   ` Brian Dolbec
2020-05-02  1:40 ` [gentoo-catalyst] [PATCH 8/8] catalyst: Replace target_portdir with repo_basedir+repo_name Matt Turner
2020-05-02 23:28   ` Brian Dolbec
2020-05-02 22:56 ` [gentoo-catalyst] [PATCH 1/8] targets: Use gensquashfs instead of mksquashfs Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200502014036.1039317-3-mattst88@gentoo.org \
    --to=mattst88@gentoo.org \
    --cc=gentoo-catalyst@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox