mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-26 13:59:02 +02:00
This results in much cleaner copyright and license declarations. SPDX headers are legally recognised and make auditing easier. Also, remove descriptions of each script, from each script. Libreboot documentation at docs/maintain/ describes them. Signed-off-by: Leah Rowe <leah@libreboot.org>
23 lines
530 B
Bash
Executable File
23 lines
530 B
Bash
Executable File
# 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}"
|