updated
This commit is contained in:
parent
81323bbf67
commit
9aa73f1877
6 changed files with 33 additions and 15 deletions
19
01-toolchain
19
01-toolchain
|
@ -1,7 +1,26 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
if [ $(id -u) = 0 ]; then
|
||||
echo "$0 script need to run as regular user!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source $(dirname $0)/toolchain/functions
|
||||
|
||||
if [ "$1" != "fetch" ]; then
|
||||
if [ ! -d $LFS/tools ]; then
|
||||
sudo mkdir -pv $LFS/tools
|
||||
fi
|
||||
|
||||
if [ ! -w $LFS ]; then
|
||||
sudo chown -Rv $USER:$USER $LFS
|
||||
fi
|
||||
|
||||
if [ ! -L /tools ] || [ $(realpath /tools) != $LFS/tools ]; then
|
||||
sudo ln -svf $LFS/tools /
|
||||
fi
|
||||
fi
|
||||
|
||||
for script in $(ls toolchain | grep ^[0-9]); do
|
||||
if [ "$1" = "fetch" ]; then
|
||||
$(dirname $0)/toolchain/$script "$1"
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ $(id -u) != 0 ]; then
|
||||
echo "$0 script need to run as root!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LFS=/mnt/lfs
|
||||
|
||||
lfs_dirs() {
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ $(id -u) != 0 ]; then
|
||||
echo "$0 script need to run as root!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
trap "exit 1" SIGHUP SIGINT SIGQUIT SIGTERM
|
||||
|
||||
LFSVERSIOM=8.3
|
||||
|
|
|
@ -12,7 +12,8 @@ SRC=${SRC:-$(dirname $0)/src}
|
|||
NAME=gcc
|
||||
VERSION=${GCC_VER}
|
||||
|
||||
fetch "http://www.mpfr.org/mpfr-$MPFR_VER/mpfr-$MPFR_VER.tar.xz" $SRC
|
||||
fetch "http://ftp.osuosl.org/pub/lfs/lfs-packages/8.3/mpfr-$MPFR_VER.tar.xz" $SRC
|
||||
#fetch "http://www.mpfr.org/mpfr-$MPFR_VER/mpfr-$MPFR_VER.tar.xz" $SRC
|
||||
fetch "https://ftp.gnu.org/gnu/mpc/mpc-$MPC_VER.tar.gz" $SRC
|
||||
fetch "http://ftp.gnu.org/gnu/gmp/gmp-$GMP_VER.tar.xz" $SRC
|
||||
fetch "http://ftp.gnu.org/gnu/gcc/gcc-$GCC_VER/gcc-$GCC_VER.tar.xz" $SRC
|
||||
|
|
|
@ -12,7 +12,8 @@ SRC=${SRC:-$(dirname $0)/src}
|
|||
NAME=gcc
|
||||
VERSION=${GCC_VER}
|
||||
|
||||
fetch "http://www.mpfr.org/mpfr-$MPFR_VER/mpfr-$MPFR_VER.tar.xz" $SRC
|
||||
fetch "http://ftp.osuosl.org/pub/lfs/lfs-packages/8.3/mpfr-$MPFR_VER.tar.xz" $SRC
|
||||
#fetch "http://www.mpfr.org/mpfr-$MPFR_VER/mpfr-$MPFR_VER.tar.xz" $SRC
|
||||
fetch "https://ftp.gnu.org/gnu/mpc/mpc-$MPC_VER.tar.gz" $SRC
|
||||
fetch "http://ftp.gnu.org/gnu/gmp/gmp-$GMP_VER.tar.xz" $SRC
|
||||
fetch "http://ftp.gnu.org/gnu/gcc/gcc-$GCC_VER/gcc-$GCC_VER.tar.xz" $SRC
|
||||
|
|
|
@ -34,16 +34,3 @@ fetch() {
|
|||
fi
|
||||
|
||||
}
|
||||
|
||||
if [ ! -d $LFS/tools ]; then
|
||||
sudo mkdir -pv $LFS/tools
|
||||
fi
|
||||
|
||||
if [ ! -w $LFS ]; then
|
||||
sudo chown -Rv $USER:$USER $LFS
|
||||
fi
|
||||
|
||||
if [ ! -L /tools ] || [ $(realpath /tools) != $LFS/tools ]; then
|
||||
sudo ln -svf $LFS/tools /
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue