Commit 6230340e authored by Kristian Klausen's avatar Kristian Klausen
Browse files

Merge branch 'fix-shellcheck' into 'master'

Fix shellcheck complains due to new version

See merge request !169
parents 53b1c79f 27fe6708
Pipeline #7174 failed with stages
in 60 minutes and 15 seconds
......@@ -9,7 +9,9 @@ readonly MIRROR="https://mirror.pkgbuild.com"
function init() {
readonly ORIG_PWD="${PWD}"
readonly OUTPUT="${PWD}/output"
readonly TMPDIR="$(mktemp --dry-run --directory --tmpdir="${PWD}/tmp")"
local tmpdir
tmpdir="$(mktemp --dry-run --directory --tmpdir="${PWD}/tmp")"
readonly TMPDIR="${tmpdir}"
mkdir -p "${OUTPUT}" "${TMPDIR}"
cd "${TMPDIR}"
......
......@@ -13,9 +13,11 @@ readonly MIRROR='https://mirror.pkgbuild.com/$repo/os/$arch'
function init() {
readonly ORIG_PWD="${PWD}"
readonly OUTPUT="${PWD}/output"
readonly TMPDIR="$(mktemp --dry-run --directory --tmpdir="${PWD}/tmp")"
local tmpdir
tmpdir="$(mktemp --dry-run --directory --tmpdir="${PWD}/tmp")"
readonly TMPDIR="${tmpdir}"
mkdir -p "${OUTPUT}" "${TMPDIR}"
if [ -n "${SUDO_UID:-}" ]; then
if [ -n "${SUDO_UID:-}" ] && [[ -n "${SUDO_GID:-}" ]]; then
chown "${SUDO_UID}:${SUDO_GID}" "${OUTPUT}" "${TMPDIR}"
fi
cd "${TMPDIR}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment