Skip to content

Commit

Permalink
Always calculate the absolute path for the output directory
Browse files Browse the repository at this point in the history
  • Loading branch information
juliogonzalez committed Aug 26, 2024
1 parent 36fbe7d commit 27c582a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions uyuni-docs-helper
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ print_incorrect_syntax() {
exit 1
}

get_dir_abs_path() {
(
cd "$(dirname ${1})"
echo "${PWD}/$(basename $1)"
)
}

print_help() {
echo ""
echo "Build the Uyuni doc using a container and (optionally) serve it for verification via HTTP"
Expand Down Expand Up @@ -181,6 +188,7 @@ if [ -z ${LOCALCLONE} ]; then
print_error "${OUTPUT} is not a directory or does not exist"
exit 2
else
OUTPUT="$(get_dir_abs_path ${OUTPUT})"
SOURCE="${SOURCE} -v ${OUTPUT}:/tmp/output${SELINUXMOUNT} --userns=keep-id"
if [ "${COMMAND}" != "help" ]; then
print_info "Output will be stored at ${OUTPUT}/build"
Expand Down

0 comments on commit 27c582a

Please sign in to comment.