]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Added functionality to upload the iso to our main server.
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 21 Jul 2008 19:52:52 +0000 (19:52 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 21 Jul 2008 19:52:52 +0000 (19:52 +0000)
doc/make.sh-usage
lfs/Config
tools/make-batch
tools/make-include
tools/make-interactive

index e8da2d28c13b7b39355b7364af4392991d80a172..49a912f810e1d0fc08573873acc8fedf864b3aaa 100644 (file)
@@ -11,6 +11,9 @@ Maintainer / advanced commands
       |`- get  : Download from source.ipfire.org.
       `-- put  : Upload to source.ipfire.org.
 
+     target    : _Images and packages_
+       `- put  : Upload everything to the public ftp server.
+
      shell     : Enter a shell inside the chroot, used to tune lfs script
                  and / or during kernel upgrade to rebuild a new .config.
 
index f90220cb76b9dbae4587bb2069dabc9149c4bd12..6f5f81f23092155832b6a219b0054a9f217a329b 100644 (file)
@@ -36,6 +36,7 @@
 URL_IPFIRE  = http://source.ipfire.org/download
 URL_TOOLCHAIN = source.ipfire.org:/pub/source/toolchains
 URL_SOURCE = source.ipfire.org:/pub/source/source-3.x
+URL_TARGET = source.ipfire.org:/srv/anonftp/pub/nightly-builds
 
 # Default compiler optimizations.
 #
index 6d0508c2471fd0afa9dec4bb14f2c10b936c47ad..050b27a08f5d2d39a73b0af9644d3720dd61a1be 100644 (file)
@@ -62,6 +62,7 @@ batch_attach() {
 batch_run() {  
        gettoolchain
        $0 build | tee $BATCHLOG
+       [ $? -eq 0 ] && puttarget
        batch_mail
 }
 
index 0f1fd4658690a153d196eda28fbf169fd04d6b59..b0acabc8ca0b9d2cc8d17fe3912dfb296c2465e7 100644 (file)
@@ -739,3 +739,20 @@ putsource() {
        [ -n "$NEW_FILES" ] && scp -2C $NEW_FILES ${IPFIRE_USER}@${URL_SOURCE}
        cd $BASEDIR
 }
+
+puttarget() {
+       check_user
+       URL_TARGET=$(grep URL_TARGET lfs/Config | awk '{ print $3 }')
+       DIR="${BASEDIR}/${HOSTNAME}/$(date '+%Y%m%d-%k')/"
+
+       rm -rf ${DIR} 2>/dev/null
+       mkdir -p ${DIR}
+
+       [ -e "${BASEDIR}/packages" ] && cp -al ${BASEDIR}/packages ${DIR}
+       cp -l ${BASEDIR}/${SNAME}-${VERSION}.${MACHINE}.iso ${DIR}
+
+       cd $BASEDIR && \
+       scp -2C -r ${HOSTNAME} ${IPFIRE_USER}@${URL_TARGET} || :
+
+       rm -rf ${DIR} 2>/dev/null
+}
index 8bd16aa09acdc0f1ceac7adeaa78e8d50f013d62..cad194f6fa70dfc14586cd1387a50a28ddbdf145 100644 (file)
@@ -140,6 +140,17 @@ toolchain)
        esac
        ;;
 
+target)
+       case "$2" in
+               put|push|upload)
+                       puttarget
+                       ;;
+               *)
+                       usage
+                       ;;
+       esac
+       ;;
+
 check)
        check_sanity $2
        ;;