]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
make.sh: Refactor uploading sources
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 5 Jul 2024 09:48:56 +0000 (09:48 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 8 Jul 2024 15:39:44 +0000 (15:39 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/Config
make.sh

index 6711af997b8c82ae60fe8a3f2a8b56e786bbe675..923fe00179d15a528ae8e3f5b80bcc47e58a7c9e 100644 (file)
@@ -79,7 +79,6 @@ ZSTD_OPTIONS = \
 #
 URL_IPFIRE  = https://source.ipfire.org/source-2.x
 URL_TOOLCHAIN = https://source.ipfire.org/toolchains
-URL_SOURCE = people.ipfire.org:/pub/sources/source-2.x
 
 # Don't change this; it will be overridden by other makefiles where necessary.
 #
diff --git a/make.sh b/make.sh
index 8e7372b325a1c0b9798fbe0f928165ea4421a5d1..ca7433f480e87104385faece3302efc5b753dcbb 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -2066,6 +2066,7 @@ readonly LOG_DIR="${BASEDIR}/log_${BUILD_ARCH}"
 readonly TOOLS_DIR="/tools_${BUILD_ARCH}"
 
 # Set URLs
+readonly SOURCE_URL="https://source.ipfire.org/ipfire-2.x"
 readonly TOOLCHAIN_URL="https://source.ipfire.org/toolchains"
 
 # Set the LOGFILE
@@ -2232,14 +2233,12 @@ gettoolchain)
        download_toolchain "${TOOLCHAIN}"
        ;;
 uploadsrc)
-       if [ -z $IPFIRE_USER ]; then
-               echo -n "You have to setup IPFIRE_USER first. See .config for details."
-               print_status FAIL
-               exit 1
+       # Check if IPFIRE_USER is set
+       if [ -z "${IPFIRE_USER}" ]; then
+               exiterror "You have to setup IPFIRE_USER first. See .config for details."
        fi
 
-       URL_SOURCE="$(awk '/^URL_SOURCE/ { print $3 }' lfs/Config)"
-
+       # Sync with upstream
        rsync \
                --recursive \
                --update \
@@ -2247,8 +2246,8 @@ uploadsrc)
                --progress \
                --human-readable \
                --exclude="toolchains/" \
-               "${BASEDIR}/cache/" \
-               "${IPFIRE_USER}@${URL_SOURCE}"
+               "${CACHE_DIR}/" \
+               "${IPFIRE_USER}@people.ipfire.org:/pub/sources/source-2.x"
 
        exit 0
        ;;