From 2f116d8a43e7e2d599a63b55c232ce54fbff3500 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 12 Oct 2018 08:33:47 +0200 Subject: [PATCH] composite: let scripts be scripts --- Makefile | 12 ++++++------ composite/batch.sh | 32 +++++++++++++++++++++++++++++++ {scripts => composite}/nightly.sh | 25 +++++++++++++++++++++++- composite/refresh.sh | 28 +++++++++++++++++++++++++++ scripts/batch.sh | 9 --------- scripts/parse_ports_log.py | 2 +- scripts/refresh.sh | 5 ----- 7 files changed, 91 insertions(+), 22 deletions(-) create mode 100755 composite/batch.sh rename {scripts => composite}/nightly.sh (60%) create mode 100755 composite/refresh.sh delete mode 100755 scripts/batch.sh delete mode 100755 scripts/refresh.sh diff --git a/Makefile b/Makefile index 9223037..8ef3e7d 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ STEPS= arm base boot chroot clean compress confirm core distfiles \ download dvd info kernel nano plugins ports prefetch print \ rebase release rename rewind serial sign skim test update \ upload verify vga vm xtools -SCRIPTS= batch nightly refresh pkg_fingerprint pkg_sign +SCRIPTS= batch nightly refresh .PHONY: ${STEPS} PAGER?= less @@ -40,12 +40,12 @@ lint-steps: @sh -n ${.CURDIR}/build/${STEP}.sh .endfor -lint-scripts: +lint-composite: .for SCRIPT in ${SCRIPTS} - @sh -n ${.CURDIR}/scripts/${SCRIPT}.sh + @sh -n ${.CURDIR}/composite/${SCRIPT}.sh .endfor -lint: lint-steps lint-scripts +lint: lint-steps lint-composite # Special vars to load early build.conf settings: @@ -152,7 +152,7 @@ ${STEP}: lint-steps .endfor .for SCRIPT in ${SCRIPTS} -${SCRIPT}: lint-scripts +${SCRIPT}: lint-composite ${VERBOSE_HIDDEN} cd ${.CURDIR} && sh ${VERBOSE_FLAGS} \ - ./scripts/${SCRIPT}.sh ${${SCRIPT}_ARGS} + ./composite/${SCRIPT}.sh ${${SCRIPT}_ARGS} .endfor diff --git a/composite/batch.sh b/composite/batch.sh new file mode 100755 index 0000000..e369f9e --- /dev/null +++ b/composite/batch.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +# Copyright (c) 2017 Franco Fichtner +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +for FLAVOUR in OpenSSL LibreSSL; do + make clean-obj ${*} FLAVOUR=${FLAVOUR} +done + +make clean-obj diff --git a/scripts/nightly.sh b/composite/nightly.sh similarity index 60% rename from scripts/nightly.sh rename to composite/nightly.sh index 40a463e..2617ea5 100755 --- a/scripts/nightly.sh +++ b/composite/nightly.sh @@ -1,6 +1,29 @@ #!/bin/sh -# nightly build script +# Copyright (c) 2017-2018 Franco Fichtner +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. eval "$(make print-LOGSDIR,PRODUCT_ARCH,PRODUCT_VERSION,STAGEDIR,TARGETDIRPREFIX)" diff --git a/composite/refresh.sh b/composite/refresh.sh new file mode 100755 index 0000000..61432bf --- /dev/null +++ b/composite/refresh.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +# Copyright (c) 2017 Franco Fichtner +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +make clean-obj,plugins,core packages diff --git a/scripts/batch.sh b/scripts/batch.sh deleted file mode 100755 index d22ad44..0000000 --- a/scripts/batch.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# simple batch script for release builds - -for FLAVOUR in OpenSSL LibreSSL; do - make clean-obj ${*} FLAVOUR=${FLAVOUR} -done - -make clean-obj diff --git a/scripts/parse_ports_log.py b/scripts/parse_ports_log.py index bcee10b..268e053 100755 --- a/scripts/parse_ports_log.py +++ b/scripts/parse_ports_log.py @@ -56,4 +56,4 @@ for item in sorted(stats.items(), key=lambda x: x[1]['__total__']): print ("%-40s %-5.0f seconds" % (package, stats[package]['__total__'])) total_time += stats[package]['__total__'] -print ("%-40s %-5.0f seconds" % ("*", total_time)) \ No newline at end of file +print ("%-40s %-5.0f seconds" % ("*", total_time)) diff --git a/scripts/refresh.sh b/scripts/refresh.sh deleted file mode 100755 index b19edab..0000000 --- a/scripts/refresh.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# refresh plugins and core in packages - -make clean-obj,plugins,core packages