put include/export.sh in build script
remove include/export.sh it's not a lot of code, and build is the only file that uses it Signed-off-by: Leah Rowe <leah@libreboot.org>btrfsvols
parent
62cc895c3c
commit
24584296a8
23
build
23
build
|
@ -9,13 +9,32 @@
|
|||
set -u -e
|
||||
|
||||
. "include/err.sh"
|
||||
. "include/export.sh"
|
||||
. "include/option.sh"
|
||||
|
||||
eval "$(setvars "" mode option project version versiondate aur_notice tmpdir)"
|
||||
|
||||
tmpdir_was_set="y"
|
||||
set | grep TMPDIR 1>/dev/null 2>/dev/null || tmpdir_was_set="n"
|
||||
if [ "${tmpdir_was_set}" = "y" ]; then
|
||||
tmpdir="${TMPDIR##*/}"
|
||||
tmpdir="${TMPDIR%_*}"
|
||||
if [ "${tmpdir}" = "lbmk" ]; then
|
||||
tmpdir=""
|
||||
tmpdir_was_set="n"
|
||||
fi
|
||||
fi
|
||||
if [ "${tmpdir_was_set}" = "n" ]; then
|
||||
export TMPDIR="/tmp"
|
||||
tmpdir="$(mktemp -d -t lbmk_XXXXXXXX)"
|
||||
export TMPDIR="${tmpdir}"
|
||||
else
|
||||
export TMPDIR="${TMPDIR}"
|
||||
fi
|
||||
tmpdir="${TMPDIR}"
|
||||
|
||||
linkpath="${0}"
|
||||
linkname="${linkpath##*/}"
|
||||
buildpath="./script/${linkname}"
|
||||
eval "$(setvars "" mode option project version versiondate aur_notice)"
|
||||
|
||||
main()
|
||||
{
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
# SPDX-FileCopyrightText: 2023 Leah Rowe <leah@libreboot.org>
|
||||
|
||||
tmpdir=""
|
||||
tmpdir_was_set="y"
|
||||
set | grep TMPDIR 1>/dev/null 2>/dev/null || tmpdir_was_set="n"
|
||||
if [ "${tmpdir_was_set}" = "y" ]; then
|
||||
tmpdir="${TMPDIR##*/}"
|
||||
tmpdir="${TMPDIR%_*}"
|
||||
if [ "${tmpdir}" = "lbmk" ]; then
|
||||
tmpdir=""
|
||||
tmpdir_was_set="n"
|
||||
fi
|
||||
fi
|
||||
if [ "${tmpdir_was_set}" = "n" ]; then
|
||||
export TMPDIR="/tmp"
|
||||
tmpdir="$(mktemp -d -t lbmk_XXXXXXXX)"
|
||||
export TMPDIR="${tmpdir}"
|
||||
else
|
||||
export TMPDIR="${TMPDIR}"
|
||||
fi
|
||||
tmpdir="${TMPDIR}"
|
Loading…
Reference in New Issue