mirror of
https://github.com/opnsense/tools.git
synced 2026-06-08 16:26:22 -04:00
build/download: allow REMOTEDIR change and consolidate away from UPLOADDIR
This commit is contained in:
parent
993bad6254
commit
c83a3f908b
6 changed files with 9 additions and 13 deletions
3
Makefile
3
Makefile
|
|
@ -117,7 +117,6 @@ MIRRORS?= https://opnsense.c0urier.net \
|
|||
https://mirror.fra10.de.leaseweb.net/opnsense \
|
||||
https://mirror.ams1.nl.leaseweb.net/opnsense
|
||||
SERVER?= user@does.not.exist
|
||||
UPLOADDIR?= .
|
||||
|
||||
STAGEDIRPREFIX?=/usr/obj
|
||||
|
||||
|
|
@ -195,7 +194,7 @@ ${STEP}: lint-steps
|
|||
-g ${TOOLSBRANCH} -E ${COREBRANCH} -G ${PORTSREFBRANCH} \
|
||||
-H "${COREENV}" -u "${UEFI:tl}" -U "${SUFFIX}" \
|
||||
-V "${ADDITIONS}" -O "${GITBASE}" -r "${SERVER}" \
|
||||
-h "${PLUGINSENV}" -I "${UPLOADDIR}" -D "${EXTRABRANCH}" \
|
||||
-h "${PLUGINSENV}" -D "${EXTRABRANCH}" \
|
||||
-A "${PORTSREFURL}" -J "${PORTSENV}" ${${STEP}_ARGS}
|
||||
.endfor
|
||||
|
||||
|
|
|
|||
|
|
@ -503,7 +503,7 @@ Logs can be downloaded as well for local inspection. Note that download
|
|||
like prefetch will purge all locally existing targets. Use SERVER to
|
||||
specify the remote end, e.g. SERVER=user@does.not.exist
|
||||
|
||||
Additionally, UPLOADDIR can be used to specify a remote location. At
|
||||
Additionally, REMOTEDIR can be used to specify a remote location. At
|
||||
this point only "logs" upload cleares and creates directories on the fly.
|
||||
|
||||
If you want to script interactive prompts you may use the confirm target
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
set -e
|
||||
|
||||
OPTS="A:a:B:b:C:c:D:d:E:e:F:G:g:H:h:I:J:K:k:L:l:m:n:O:o:P:p:R:r:S:s:T:t:U:u:v:V:"
|
||||
OPTS="A:a:B:b:C:c:D:d:E:e:F:G:g:H:h:J:K:k:L:l:m:n:O:o:P:p:R:r:S:s:T:t:U:u:v:V:"
|
||||
|
||||
while getopts ${OPTS} OPT; do
|
||||
case ${OPT} in
|
||||
|
|
@ -80,9 +80,6 @@ while getopts ${OPTS} OPT; do
|
|||
h)
|
||||
export PLUGINSENV=${OPTARG}
|
||||
;;
|
||||
I)
|
||||
export UPLOADDIR=${OPTARG}
|
||||
;;
|
||||
J)
|
||||
export PORTSENV=${OPTARG}
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright (c) 2018-2019 Franco Fichtner <franco@opnsense.org>
|
||||
# Copyright (c) 2018-2025 Franco Fichtner <franco@opnsense.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
|
@ -34,7 +34,7 @@ SELF=download
|
|||
download()
|
||||
{
|
||||
echo ">>> Downloading ${1} from ${PRODUCT_SERVER}..."
|
||||
(cd ${2}; echo "get ${2}/${3}" | sftp ${PRODUCT_SERVER})
|
||||
(cd ${2}; echo "get ${REMOTEDIR:-"${2}"}/${3}" | sftp ${PRODUCT_SERVER})
|
||||
}
|
||||
|
||||
for ARG in ${@}; do
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright (c) 2018-2024 Franco Fichtner <franco@opnsense.org>
|
||||
# Copyright (c) 2018-2025 Franco Fichtner <franco@opnsense.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
|
@ -34,7 +34,7 @@ SELF=upload
|
|||
upload()
|
||||
{
|
||||
echo ">>> Uploading ${1} to ${PRODUCT_SERVER}..."
|
||||
(echo "cd ${UPLOADDIR}"; echo "put ${2}/${3}") | sftp ${PRODUCT_SERVER}
|
||||
(echo "cd ${REMOTEDIR:-"."}"; echo "put ${2}/${3}") | sftp ${PRODUCT_SERVER}
|
||||
}
|
||||
|
||||
for ARG in ${@}; do
|
||||
|
|
|
|||
|
|
@ -111,8 +111,8 @@ tar -C ${TARGETDIRPREFIX} -cJf \
|
|||
rm -rf ${LOGSDIR}/latest
|
||||
mv ${LOGSDIR}/${PRODUCT_VERSION} ${LOGSDIR}/latest
|
||||
|
||||
# XXX SERVER and UPLOADDIR are forced here and not imported from Makefile
|
||||
(make upload-log SERVER=${SERVER} UPLOADDIR=${UPLOADDIR} \
|
||||
# XXX SERVER and REMOTEDIR are forced here and not imported from Makefile
|
||||
(make upload-log SERVER=${SERVER} REMOTEDIR=${REMOTEDIR} \
|
||||
VERSION=${PRODUCT_VERSION} 2>&1) > ${LOGSDIR}/latest/upload.log
|
||||
|
||||
cat ${LOGSDIR}/latest/watch.log
|
||||
|
|
|
|||
Loading…
Reference in a new issue