forked from KeithDHedger/LFSBootCD
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetSources
More file actions
executable file
·74 lines (58 loc) · 2.33 KB
/
Copy pathgetSources
File metadata and controls
executable file
·74 lines (58 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
#©keithhedger Wed 14 Jun 19:51:12 BST 2017 kdhedger68713@gmail.com
LFSVERSION="9.0"
LFSGITVERSION="$LFSVERSION"
#LFSGITVERSION="dev"
SYSTEMSOURCE=cdtree/LFS/LFSSourceArchives/$LFSVERSION/SYSTEM
NETSOURCE=cdtree/LFS/LFSSourceArchives/$LFSVERSION/NET
SYSSOURCE=cdtree/LFS/LFSSourceArchives/$LFSVERSION/SYS
WGET_VERS=1.20.3
WGETTAR="https://ftp.gnu.org/gnu/wget/wget-$WGET_VERS.tar.gz"
UNZIPTAR="http://downloads.sourceforge.net/infozip/unzip60.tar.gz"
TOOLS32TAR="https://github.com/KeithDHedger/LFSBootCD/releases/download/${LFSGITVERSION}/tools-${LFSGITVERSION}_32.tar.bz2"
TOOLS64TAR="https://github.com/KeithDHedger/LFSBootCD/releases/download/${LFSGITVERSION}/tools-${LFSGITVERSION}_64.tar.bz2"
TOOLS64SYTEMDTAR="https://github.com/KeithDHedger/LFSBootCD/releases/download/${LFSGITVERSION}/tools-systemd-${LFSGITVERSION}_64.tar.bz2"
LFSPKGBUILDS="https://github.com/KeithDHedger/LFSPkgBuilds/archive/${LFSGITVERSION}.zip"
#Or:
#git clone --single-branch --branch ${LFSGITVERSION} https://github.com/KeithDHedger/LFSPkgBuilds
LFSPKG="https://github.com/KeithDHedger/LFSPkg/archive/master.zip"
mkdir -vp cdtree/LFS $NETSOURCE $SYSSOURCE $SYSTEMSOURCE||true
if [ ! -e $SYSTEMSOURCE/gotsystemsources ];then
wget http://www.linuxfromscratch.org/lfs/view/$LFSVERSION/wget-list
wget http://www.linuxfromscratch.org/lfs/view/$LFSVERSION/md5sums
mv md5sums $SYSTEMSOURCE
wget -i wget-list -c -P $SYSTEMSOURCE
#wget/unzip from the blfs book I prefer to make this as part of the main system
wget -c "$WGETTAR" -P $NETSOURCE
wget -c "$UNZIPTAR" -P $SYSSOURCE
touch $SYSTEMSOURCE/gotsystemsources
rm wget-list
pushd $SYSTEMSOURCE
if ! md5sum -c md5sums;then
echo "WARNING ... md5 hashes did NOT match, Exiting ..."
exit 1
fi
popd
fi
if [ ! -e cdtree/LFS/gottools ];then
wget -c "$TOOLS32TAR" -P cdtree/LFS
wget -c "$TOOLS64TAR" -P cdtree/LFS
wget -c "$TOOLS64SYTEMDTAR" -P cdtree/LFS
touch cdtree/LFS/gottools
fi
if [ ! -e cdtree/LFS/gotpkgbuilds ];then
pushd cdtree/LFS
wget -c "$LFSPKGBUILDS"
unzip ${LFSGITVERSION}.zip
mv LFSPkgBuilds-${LFSGITVERSION} LFSPkgBuilds
rm -r LFSPkgBuilds/.gitignore ${LFSGITVERSION}.zip
cp -r ../../LFSScripts/BuildFileSystem LFSPkgBuilds/LFSScripts
pushd LFSPkgBuilds/LFSPkgBuildScripts/admin/LFSPkg
wget -c $LFSPKG
unzip master.zip
rm master.zip
popd
touch gotpkgbuilds
popd
fi
exit 0