abhiTronix / raspberry-pi-cross-compilers

Latest GCC Cross Compiler & Native (ARM & ARM64) CI generated precompiled standalone toolchains for all Raspberry Pis. 🍇
https://sourceforge.net/projects/raspberry-pi-cross-compilers
GNU General Public License v3.0
594 stars 104 forks source link

rm *.tar.* makes the builder to stop #103

Closed sleeperss closed 2 months ago

sleeperss commented 2 years ago

Hi,

In the builderscript there is multiple rm *.tar.* that doesn't remove anything (for example if we reach an if statement that use git instead of a tarball as in lines 184-195).

But without the -f option it leads the script to stop.

Solution : add the -f argument to each rm lines.

Patch :

--- r   2022-04-29 22:38:04.415101400 +0200
+++ rr  2022-04-29 22:38:12.395101400 +0200
@@ -164,10 +164,10 @@
       sed -i contrib/download_prerequisites -e '/base_url=/s/ftp/http/'
    fi
    contrib/download_prerequisites
-   rm -f ./*.tar.*
+   rm ./*.tar.*
    if [ "$GCCBASE_VERSION" = "6.3.0" ]; then sed -i "1474s/.*/      || xloc.file[0] == '\\\0' || xloc.file[0] == '\\\xff'/" ./gcc/ubsan.c; fi #apply patch
    cd "$DOWNLOADDIR" || exit
-   rm -f ./*.tar.*
+   rm ./*.tar.*
 fi
 if [ ! -d "binutils-$BINUTILS_VERSION" ]; then
    if [ ! -f "binutils-$BINUTILS_VERSION.tar.bz2" ]; then
@@ -177,7 +177,7 @@
    cd binutils-$BINUTILS_VERSION || exit
    mkdir -p build
    cd "$DOWNLOADDIR" || exit
-   rm -f ./*.tar.*
+   rm ./*.tar.*
 fi
 if [ ! -d "glibc-$GLIBC_VERSION" ]; then
    # Download patched Glibc 2.31 if GCC 10 series are being built
@@ -192,7 +192,7 @@
    cd glibc-$GLIBC_VERSION || exit
    mkdir -p build
    cd "$DOWNLOADDIR" || exit
-   rm -f ./*.tar.*
+   rm ./*.tar.*
 fi
 if [ ! -d "gdb-$GDB_VERSION" ]; then
    if [ ! -f "gdb-$GDB_VERSION.tar.xz" ]; then
@@ -202,7 +202,7 @@
    cd gdb-$GDB_VERSION || exit
    mkdir -p build
    cd "$DOWNLOADDIR" || exit
-   rm -f ./*.tar.*
+   rm ./*.tar.*
 fi
 if [ ! -d "gcc-$GCC_VERSION" ]; then
    # Download patched GCC 10 series for bullseye
@@ -218,9 +218,9 @@
    mkdir -p build
    sed -i contrib/download_prerequisites -e '/base_url=/s/ftp/http/'
    contrib/download_prerequisites
-   rm -f ./*.tar.*
+   rm ./*.tar.*
    cd "$DOWNLOADDIR" || exit
-   rm -f ./*.tar.*
+   rm ./*.tar.*
 fi

 echo "Setting up paths..."
abhiTronix commented 2 years ago

@sleeperss Again thanks for this suggestion. Any related PR will always be welcomed. 😃