From 443aa4cf07b074b41fd6036a9b8496cbc9d58a90 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 15 Jul 2023 13:39:58 +0300 Subject: feat(ikiwiki.sh): run ambient-run from dir where ikiwiki.sh is Sponsored-by: author --- ikiwiki.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ikiwiki.sh b/ikiwiki.sh index de71ea8..7d8a778 100755 --- a/ikiwiki.sh +++ b/ikiwiki.sh @@ -7,6 +7,8 @@ setup="$1" srcdir="$(sed -n '/^srcdir: */s///p' "$setup")" destdir="$(sed -n '/^destdir: */s///p' "$setup")" +ambientdir="$(dirname "$0")" + artifact="$(mktemp)" artifactdir="$(mktemp -d)" trap 'rm -rf "$artifact $artifactdir"' EXIT @@ -14,7 +16,7 @@ trap 'rm -rf "$artifact $artifactdir"' EXIT if [ ! -e "$srcdir/.ambient-script" ]; then cp ikiwiki-ambient-script "$srcdir/.ambient-script" fi -./ambient-run \ +"$ambientdir/ambient-run" \ --image ~/tmp/ambient/ambient-ikiwiki.qcow2 \ --artifact "$artifact" \ --dependencies ~/.ikiwiki/ \ -- cgit v1.2.1