From 2908ed770580deba4013928ff0f06ef85c17e3f6 Mon Sep 17 00:00:00 2001 From: YellowJacketLinux Date: Thu, 10 Oct 2024 14:32:34 -0700 Subject: [PATCH] Set up thumb drive for rebuild --- PRENINE.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 PRENINE.sh diff --git a/PRENINE.sh b/PRENINE.sh new file mode 100644 index 0000000..68bd375 --- /dev/null +++ b/PRENINE.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +function myfail { + echo "$1" + exit 1 +} + +if [ "`whoami`" != "root" ]; then + myfail "Must run this script as r00t" +fi + +LFS="/mnt/newlfs" + +# So USB thumb drive install does not need a network connection +if [ ! -d ${LFS}/home/lfs ]; then + if [ ! -f /home/lfs/lfs-buildscripts/USBFlash ]; then + mkdir -p ${LFS}/home/lfs + cp /home/lfs/lfs-sources.tar ${LFS}/home/lfs/ + cp -ar /home/lfs/lfs-buildscripts ${LFS}/home/lfs/ + touch ${LFS}/home/lfs/lfs-buildscripts/USBFlash + fi +fi